Guia de Scripts 1
En base a que muchos pidieron guías de scripts, voy a tratar de postear alguna que otra cada par de días. Estas guías no están hechas al 100% por mí, si no que la idea base viene de Eclipse.
En base a que muchos pidieron guías de scripts, voy a tratar de postear alguna que otra cada par de días. Estas guías no están hechas al 100% por mí, si no que la idea base viene de Eclipse.
Esta es la lista de todos los commandos para scriptear en Ramza Engine, obviamente algunos estan desactualizados.
Function GetVar(File, Header, Var)
getvar(“file.ini”, “header”, “variable”)
pretty much the same as putvar
file.ini = location
header = header
variable = variable
this command gets a variable that was saved by the putvar command
Call Putvar(“file.ini”, “header”, “variable”, 4)
file.ini = file variable goes into
header = header variable is under
Example of header =
[header]
variable = 4
variable = the variable that it is set in
4 = the vaule set in variable
this command saves a variable
call globalmsg(“this is what it says”, 5)
5 = color (colors are said at top of main.txt)
this command calls a message to everyone on your game
Call AdminMsg(“this is what it says”, 5)
5 = color(said at top of main.txt)
this command calls a message to all admin on game
call playermsg(index, “this is what it says”, 5)
index = who its going to (index means self)
index example = player steps on tile that has the command playermsg(index, “hi”, 5) its going to send a message to the player that stepped on the tile that says hi if it says playermsg(sting, “hi”, 5) when a player steps on that tile it is going to send a message to sting that says hi<—-(im not explaining this again in every index)
5 = color
this command calls a message only one player can see
call mapmsg(5, “this is what it says”, 6)
5 = map the message is desplayed on
6 = color
this command calls a message to everyone on a certain map
call alertmsg(index, “this is what it says)
index = you know…
this command calls a message that pops up to the player warning him/her
getplayerlogin(index)
gets player login name (name they type in on the login and password screen)
getplayername(index)
this command gets the players name
getplayerguild(index)
gets the guild the player is in
getplayerguildaccess(index)
gets the access level of the player in the guild he is in
call setplayerguildaccess(index, 5)
5 = this is the level of access it is set to
this command sets the guild access of a player in his guild
call setplayerguildname(index, “guildname”)
guildname = name of the guild set to
this command sets the a players guild to whatever you put as guildname
getplayerclass(index)
this command gets the players class by number not name (1, 2, 3)
call setplayerclass(index, 2)
2 = what class it is set to
this sets the players class
getplayerclassname(index)
this command gets the players class by name not number
getplayersprite(index)
this command gets the sprite number that the player currently has
call setplayersprite(index, 5)
5 = sprite number player is set to
this command sets the players sprite
getplayerlevel(index)
this command gets the players current level
call setplayerlevel(index, 5)
5 = what level the player is set to
this command sets the players level to level told
getplayernextlevel(index)
this command gets the players exp max needed till the next level
getplayerexp(index)
this command gets the amoun of exp the player has
call setplayerexp(index, 3000)
3000 = the amount of exp the players exp is set to
this command sets the players exp that he or she has
getplayeraccess(index)
this command gets the players admin access
0 = none
1 = moderator
2 = mapper
3 = developer
4+ = main developer
call setplayeraccess(index, 5)
5 = access set to
this command sets the players admin access
getplayerpk(index)
this command gets the amount of players the player has pked(player killed)
call setplayerpk(index, 5)
5 = number of pks set to
this sets the number of pks the player has
getplayerhp(index)
this command gets the players current hp (not max)
call setplayerhp(index, 200)
200 = amount of hp set to
this command sets the players hp (not max)
getplayermp(index)
this command gets players current mp (not max)
call setplayermp(index, 5)
5 = set amount of mp
this command sets the current mp of the player (not max)
getplayersp(index)
gets players current sp (not max)
call setplayersp(index, 5)
5 = amount of sp set
sets players current sp (not max)
getplayermaxhp(index)
this will give you the max hp of the player
getplayermaxmp(index)
this will give you the max mp of the player
getplayermaxsp(index)
this will give you the max sp of the player
getclassmaxhp(1)
1 = class #
gives you the max hp of a sertain class
getclassmaxmp(1)
1 = class #
gives you the max mp of a sertain class
getclassmaxsp(1)
1 = class #
gives you the max sp of a sertain class
getclassstr(1)
1 = class #
gets the str of a class
getclassdef(1)
1 = class #
gets the def of a class
getclassspeed(1)
1 = class #
gets the speed of a class
getclassMAGI(1)
1 = class #
gets the magi of a class
getplayerstr(index)
gets players current str stat
call setplayerstr(index, 4)
4 = strength set to
sets players strength to stertain amount
getplayerdef(index)
gets players current def stat
call setplayerdef(index, 4)
4 = Defence set to
sets players Defence to stertain amount
getplayerspeed(indeX)
gets the current speed stat of player
call setplayerspeed(index, 5)
5 = speed set to
sets player speed to sertain amount
getplayermagi(index)
gets player current magi stat
call setplayermagi(index, 1)
1 = magi set to
sets players magi stat to a sertain number
getplayerpoints(index)
gets players current unused stat points
call setplayerpoints(index, 400)
400 = amount of points set to
sets the players amount of unused points
getplayermap(index)
gets the current map of the player
call setplayermap(index, 4)
4 = map set to
sets the players map
getplayerx(index)
gets the current x postion of the player
call setplayerx(index, 5)
5 = x set to
sets the current x postion of player
getplayery(index)
gets players current y position
call setplayery(index, 3)
3 = y set to
sets players current y position
getplayerdir(index)
gives the players direction by number (numbers listed at top of main.txt)
call setplayerdir(index, 4)
4 = direction set to
sets player direction
getplayerip(index)
gets the players I.P.
getplayerinvitemnum(index, 3)
3 = item slot checked
checks what item is in sertain item slot (by number)
call setplayerinvitemnum(index, 3, 4)
3 = item slot
4 = item num
gives player item in sertain item slot (will replace an item if the slot is not empty)
getplayerinvitemvalue(index, 3)
3 = item slot
gets player item amount in item slot
Example: in slot 1 player has 300 gold and I declar the command getplayerinvitemvalue(index, 1) it will return the number 300
call setplayerinvitemvalue(index, 1, 200)
1 = slot
200 = amount
sets the amount of item in slot
example: if player has gold in slot one it will make him have 200 gold in slot one
getplayerinvitemdur(index, 1)
1 = slot
gives the durability of the item in slot declared
call setplayerinvitemdur(index, 1, 3)
1 = slot
3 = amount of durability
sets the item’s durability in declared slot to declared durability
getplayerspell(index, 1)
1 = spell slot
gives the spell in the spell slot declared(by number)
call setplayerspell(index, 1, 3)
1 = spell slot
3 = spell
sets player spell in declared spell slot
getplayerarmorslot(index)
gives the number of the item in the players armor slot
getplayerweaponslot(index)
gives the number of the item in the players weapon slot
getplayerhelmetslot(index)
gives the number of the item in the players helmet slot
getplayerShieldslot(index)
gives the number of the item in the players shield slot
getplayernecklaceslot(index)
gives the number of the item in the players necklace slot
getplayerringslot(index)
gives the number of the item in the players ring slot
getplayerlegsslot(index)
gives the number of the item in the players legs slot
getbootmap(index)
gets the boot map of the map that the player is on
getbootx(index)
gets the boot x on the map the player is on
getbooty(index)
gets the boot y on the map the player is on
call isscrolling()
tells if the game is scrolling or not
0 = no
1 = yes
getmaxplayers()
gets the max amount of players aloud on server at once
call spawnitemslot(5, 6, 2, 1, 3, 4, 7)
5 = not sure -_-
6 = item number spawned
7 = y position of item
2 = amount of the item spawned
1 = the items durrability
3 = the map the item is spawned on
spawns an item on a map
call isconnected(index)
tells if the player is connected or not
0 = no
1 = yes
call isplayering(index)
tells if the player is playing or not
0 = no
1 = yes
call sendinventory(index)
sends player new inventory information
call sendinventoryupdate(index, 1)
1 = item slot
sends information to player of item in slot
used for = if you use a script to set a player item you use this so the player will know or he will not know that he had an item set in his invetory
call sendwornequipment(index)
sends an update of the equipment the player is wearing
call sendhp(index)
sends players current hp update
call sendmp(index)
sends players current mp update
call sendsp(index)
sends player current sp update
call sendstats(index)
sends player stat update
call flash(index, “flash.flash”)
flash.flash = the file the flash is located im not sure what is really sapost to be after the .
shows a flash file to a player
The question pops up like a message box.
The final value is what case script you want to use, depending on the answer. So, if you have it set to 0, it will use the case 0 of yes or no (depending on which one it answers).
call sendplayerdata(index)
sapost to send player new data
(never got it to work)
call setplayername(index, “name here”)
sets the players name to declared name
getplayercharnum(index)
gets the players character number (1, 2,or 3)
Findplayer(index)
finds player location
call playerwarp(index, 1, 2, 3)
1 = map warped to
2 = x warped to
3 = y warped to
calls a player warp(changes location of player)
call paperdollsaver(index)
sorry again guys i dont use paperdolls so I dont kno what this does but from the looks of it it saves your paperdoll
call addlog(“added text goes here”, “FN goes here”)
adds text to log
call hackingattempt(index, “Reason for saying he hacking”)
kicks player from server for hacking with a little message
call battlemsg(index, “Message here”, 4, side)
4 = color
side = I dont know again sorry
im not sure as to what this does =( but guess is it sends a message to player
Rand(1, 5)
1 = lowest number
5 = highest number
creates a random number inbetween the 2 numbers declared
call setplayerbankitemnum(index, 3, 2)
3 = bank slot
2 = item num
puts an item in players bank
getplayeritemvalue(index, 3)
3 = bank slot
gets the item in bank slot value
call setplayeritemvalue(index, 3, 200)
3 = bank slot
200 = amount
sets the item in bank slot amount
getplayerbankitemdur(index, 3)
3 = bank slot
gets the durability of the item in bank slot 3
call setplayerbankitemdur(index, 3, 200)
3 = bank slot
200 = durability
sets the durability of an item in declared bank slot
getplayertarget(index)
gets the players target (players not npc)
example: if getplayertarget(index) = “sting” then
Call SetTimer(“tmrtest ” & index & “,” & script, interval)
– Timers run until stopped
Example: Call settimer(“tmrtest ” & index & “,” & 3, 800)
call RemoveTimer(“tmrtest ” & index & “,” & script)
– Ends / Removes timers
Example: Call Removetimer(“tmrtest ” & index & “,5”)
call SetTile(map, x, y, xset, yset, tileset, layer)
– places an tile on the x and y position specified
Example: call SetTile(1, 10, 10, 15, 12, 2, 3)
GetTileX(map, x, y, layer)
– gets tile on the X position on the tileset
Example: if GetTileX(1, 2, 2, 4) = 4 then
GetTileY(map, x, y, layer)
– gets tile on the Y position on the tileset
Example: if GetTileY(1, 2, 2, 4) = 4 then
GetTileSet(map, x, y, layer)
– gets tile on the tileset used on the x and y position
Example: if GetTileSet(1, 2, 2, 4) = 4 then
Call SpellAnim(spellnum, map, x, y)
– displays the animation on the specified map and x and y position
Example: Call SpellAnim(5, 1, 10, 12)
Call SetMapNpcNumber(MapNum, Index, number)
number = the number of the npc
– set the npc on that map
Example: Call SetMapNpcNumber(1, Index, 1)
Call SetMapNpcTarget( MapNum, Index, Target)
target = the index number of the player the npc should target
– set the target of the npc
Example: Call SetMapNpcTarget(1, Index, 1)
Call SetMapNpcDir( MapNum, Index, direction)
direction = the direction the npc should face
– set the direction of the npc
Example: Call SetMapNpcDir(4, Index, 0)
Call SetMapNpcY( MapNum, npc_Index, NPC_Y)
– set the Y location of the npc
Example: Call SetMapNpcY(1, 2, 5)
Call SetMapNpcX( MapNum, npc_Index, NPC_Y)
– set the X location of the npc
Example: Call SetMapNpcX(1, 2, 5)
Call SetMapNpcHP( MapNum, npc_Index, HitPoints)
– set the health of the npc
Example: Call SetMapNpcHP(1, 2, 15)
Call sendNPC( MapNum, MapNpcNum)
– update the npc after altering it through scripts
Example: Call sendNPC(1, 2)
GetNpcMaxhp(npc_Index)
– get the max health of the npc
Example: GetNpcMaxhp(1)
GetMapNPCnumber( MapNum, Index)
– get the number of the npc on that map
Example: GetNpcMaxhp(1, 5)
GetMapNpcHP( MapNum, Index)
– get the health of the npc on that map
Example: GetMapNpcHP(1, 5)
GetNpcName(number)
– returns the name of the npc
Example: GetNpcName(50)
GetNpcBehavior( number)
– returns the behavior of the npc (shopkeeper, guard, etc)
Example: GetNpcBehavior(50)
GetNpcExp(number)
– returns the number of exp you get from that specific npc
Example: GetNpcExp(50)
GetNpcDefence(number)
– returns the defence of that specific npc
Example: GetNpcDefence(50)
GetNpcStrenght(number)
– returns the strenght of that specific npc
Example: GetNpcStrenght(50)
SendIndexWornEquipment(Index)
– updates you’re current equipment to everybody
Example: call SendIndexWornEquipment(Index)
SendIndexWornEquipmentFromMap(Index)
– updates you’re current equipment to everybody on the same map as you are on
Example: call SendIndexWornEquipmentFromMap(Index)
getPlayersOnMap(MapNum)
– returns the number of players on that map
Example: getPlayersOnMap(1)
ScriptSpawnNpc(MapNpcNum, MapNum, spawn_x, spawn_y, NpcNum)
– spawns an npc on that specific map
Example: Call ScriptSpawnNpc(5, 1, 20, 10, 50)
opens a shop up
-shopnum: the shop number opened
Example: call goshopping(index, 2)
locks a player making them unable to move
-locked: 1 = cant move 0 = can
Example: call lockplayer(index, 1)
checks if the player is locked
Example: if getplayerlocked(index) = 1 then
sets the in game time (hour)
Example: call setservertimehour(12)
set the in game time (minutes)
Example:call setservertimeminute(43)
set in game time (seconds)
Example: call setservertimesecond(40)
tells the time of server (hours)
example: if getservertimehour() = 12 then
tells the time of server (minutes)
example: if getservertimeminute() = 30 then
tells the time of server (seconds)
if getservertimesecond() = 40 then
gets the name of the map
-f_map = map number
example: if getmapname(10) = “script” then
gets the map that is above map requested (like when u go off screen up where u go)
f_map = map number
example: if getmapup(getplayermap(index)) = 100 then
same as getmapup except checks below map
same as getmapup except checks right map
same as getmapup except checks left map
loads a webpage
address = url
example: call loadinternet(index, “http://www.touchofdeathproductions.com“)
reloads a shop (incase added item with a script)
shopnum = the shop number to reload
example: call reloadshop(1)
sets the players speed (4 is walking default 8 is running default)
movment = walking speed set or running speed set
speed = the amount to change speed to
example: call setspeed(index, walk, 24)
gets the x location of an npc on a map
mapnum = map number
mapnpcnum = the npc slot number
example: if getnpcx(1, 1) = 1 then
same as getnpcx execpt gets y position
sets the color of a players name
color = the color u wanna set (see top of main.txt for color list)
Example: call colorplayername(index, 5)
locks player spells making it so he/she cant cast spells
locked = 1 = cant cast spells, 0 = can cast spells
example: lockspells(index, 1)
same as lockspells exept makes it so player cant use items
same as lockspells exept makes it so player cant attack
tells who is on map in certain location (returns the index number not the name if player)
map = map number
x = x location
y = y location
example: call playerwarp(getindexplayeronmap(1, 1, 1), 1, 1, 1)
sets the players pet
npcnum = the npc number wanted to become pet
example: setplayerpet(index, 5)
returns the npc number of the player’s pet
example: if getplayerpet(index) = 1 then
gets what number of head player selected when creating character
example: if getplayerhead(index) = 1 then
changes the players head that was chosen when creating character
head = head number
example: call setplayerhead(index, 1)
same as getplayerhead cept its for his body
same as setplayerhead cept its for his body
same as getplayerhead cept its for his legs
same as setplayerhead cept ifs for his legs
gets the players gender 1 = female, 0 = male
example: if getplayergender(index) = 1 then