Scripting Events

Discussion in 'Scripting' started by TheCord, Dec 18, 2010.

  1. TheCord

    TheCord New Member

    Quick list of all of the scripting events that is included on the server. Some may be missing, this is just the list that the server provides. Enjoy. I didn't test every since one so some may not work.

    Function GAINEXP
    -Executes when a player gains any amount of experience.
    (Parameter 0 = Index, Parameter 1 = EXP, Parameter 2 = Gained Through Party ie. 0 or 1)

    Sub PLAYERLEVELUP
    -Executes when a player gains a level.
    (Parameter 0 = Index)

    Sub JOINGAME
    -Executes when a player joins the game.

    Sub JOINMAP or JOINMAP#
    -Executes when a player joins any map, or a specific map number.
    (Parameter 1 = Map Number)

    Sub PARTMAP or PARTMAP#
    -Executes when a player leaves any map, or a specific map number.
    (Parameter 1 = Map Number)

    Function PLAYERDIE
    -Executes when a player is killed. (0 HP.)

    Function DROPOBJ or DROPOBJ#
    -Executes when a player drops any object, or a specific object number.
    (Parameter 1 = Object Number, Parameter 2 = Inventory slot number)

    Function DIEDROPOBJ or DIEDROPOBJ#
    -Executes when death forces a player to drop any object, or a specific object number.
    (Parameter 1 = Object Number, Parameter 2 = Inventory slot number)
    Function Dropobj[OBJECT NUMBER] Diedropobj[OBJECT NUMBER] Dropobj

    Function MAPSAY or MAPSAY#
    -Executes when a player speaks on any map, or a specific map number.
    (Parameter 1 = Message(String))

    Function PLAYERWALKING
    -Executes when a player is walking.
    (Parameter 1 = Destination X, Parameter 2 = Destination Y, Parameter 3 = Speed(4 is walk, 8 is run))

    Sub PLAYERWALK
    -Execute when a player walks.
    (Parameter 1 = Destination X, Parameter 2 = Destination Y, Parameter 3 = Speed(4 is walk, 8 is run))

    Function MONSTERSEE or MONSTERSEE#
    -Executes when any monster sees a player, or when a certain monster sees a player.
    (Parameter 1 = Map Monster Number (0-5), Parameter 2 = Global Monster Number (1-255))

    Sub WARPTILE or WARPTILE[Map Number]_[X Location]_[Y Location]
    -Executes when a player steps onto any warp tile, or a warp tile on a certain location.
    (Parameter 1 = Target Map, Parameter 2 = Target X, Parameter 3 = Target Y)

    Sub DOORTILE
    -Executes when a player steps on any door tile attribute.

    Sub TILESCRIPT_# or TS#
    -Executes when a player step on a specific tilescript attribute.
    (Parameter 1 = X, Parameter 2 = Y)

    Sub MAP[Map Number]_[X Location]_[Y Location]
    -Executes when a player steps onto a script tile attribute on a certain location.

    Function GETOBJ or GETOBJ#
    -Executes when a player picks up any object or a certain object number or buys from an NPC.
    (Parameter 1 = Object Number, Parameter 2 = Map Object Number (0 to 49))
    [ot]May be incorrect.[/ot]

    Function DROPOBJ or DROPOBJ#
    -Executes when a player drops any object, or a specific object number or sells an object to an NPC.
    (Parameter 1 = Inventory Slot, Parameter 2 = Object Number, Parameter 3 = How Much)
    [ot]May be incorrect.[/ot]

    Function UPLOADMAP
    -Executes when a map is uploaded.
    (Parameter 1 = Map Number)

    Sub PLAYERTELL
    -Executes when a player /tells another player.
    (Paramter 1 = Target Player, Parameter 2 = Message(String))
    [ot]Didn't test whether or not it works.[/ot]

    Function BROADCAST
    -Executes when a player broadcasts a message.
    (Parameter 1 = Message (String))

    Sub GLOBALMESSAGE
    -Executes when a god says a global message. (/god global [Message])
    (Parameter 1 = Message (String))

    Sub GODMOTD
    -Executes when a god edits the message of the day. (/god motd [Message])
    (Parameter 1 = Message (String))

    Sub GODCHAT
    -Executes when a god uses god chat. (/god chat [Message])
    Sub Globalmessage Godmotd Godchat
    (Parameter 1 = Message (String))

    Sub GODWARP
    -Executes when a god warps to a location. (/god warp [MAP] [X Location] [Y Location])
    (Parameter 1 = Map, Parameter 2 = X, Parameter 3 = Y)

    Sub GODWARPME
    -Executes when a god warps to a player. (/god warpme [Player Name])
    (Parameter 1 = Target Player)

    Sub GODWARPTO
    -Executes when a god warp a player to them. (/god warpto [Player Name])
    (Parameter 1 = Target Player)

    Sub GODDELETEGUILD
    -Executes when a god deletes a guild.
    (Parameter 1 = Guild Number)

    Sub GODSETSPRITE
    -Executes when a god sets a players sprite. (/god setsprite [Player Name] [Sprite Number])
    (Parameter 1 = Target Player, Parameter 2 = Sprite Number)

    Sub GODSETNAME
    -Executes when a god changes his or her name. (/god setname [Name])
    (Parameter 1 = Target Player, Parameter 2 = New Name(String))

    Sub GODRESETMAP
    -Executes when a god resets a map. (/god resetmap)
    (Parameter 1 = Map Number)

    Sub GODBOOT
    -Executes when a god boots a player. (/god boot [Player Name])
    (Parameter 1 = Target Player)

    Sub GODUNBAN
    -Executes when a god unbans a player.
    (Parameter 1 = Target Ban Number)

    Sub GODSETGUILDSPRITE
    -Executes when a god sets a guilds sprite. (/god setguildsprite [Guild Name] [Sprite Number])
    (Parameter 1 = Guild Number, Parameter 2 = Sprite Number)

    Sub GODEDITOBJECT
    -Executes when a god edits an object. (/god editobject)
    (Parameter 1 = Object Number)

    Sub GODEDITMONSTER
    -Executes when a god edits a monster. (/god editmonster)
    (Parameter 1 = Monster Number)

    Function ATTACKPLAYER
    -Executes when a player attacks another player.
    (Parameter 1 = Target Player, Parameter 2 = Damage, Parameter 3 = Hit Accuracty (If greater than targets agility then the hit is successful, defined by the equation Int(Rnd * (100 + player(A).Agility /4))))

    Sub KILLPLAYER
    -Executes when a player kills another player.
    (Parameter 0 = Killer, Parameter 1 = Player that died)
    Function ATTACKMONSTER
    -Executes when a player attacks any monster.
    (Parameter 1 = Map Monster Number (0-6), Parameter 2 = Damange)

    Function MONSTERDIE or MONSTERDIE#
    -Executes when any monster dies, or a certain monster dies.
    (Parameter 1 = Map Monster Number, Parameter 2 = Experience.)

    Function CLICKPLAYER
    -Executes when a player clicks any other player.
    (Paramter 1 = Target)

    Sub DESCRIBE
    -Executes when a player edits their description. (/d [DESCRIPTION])
    (Parameter 1 = New Description (String))

    Sub JOINGUILD
    -Executes when a player joins a guild.
    (Parameter 1 = Guild Number)

    Sub PARTGUILD
    -Executes when a player leaves a guild.
    (Parameter 1 = Guild Number)

    Sub CREATEGUILD
    -Executes when a player creates a guild.
    (Parameter 1 = Guild Number)

    Sub INVITEGUILD
    -Executes when a player invites another player to a guild.
    (Parameter 1 = Target, Parameter 2 = Guild Number)

    Sub KICKGUILD
    -Executes when a player kicks another player from a guild.
    (Parameter 1 = Target, Parameter 2 = Guild Number)

    Sub SETGUILDRANK
    -Executes when a player changes guild ranks.
    (Parameter 1 = Target Player, Parameter 2 = New Rank)

    Sub ADDGUILDDECLARATION
    -Executes when a guild adds a new guild declaration.
    (Parameter 1 = Guild Number, Parameter 2 = Target Guild Number, Parameter 3 = Declaration Type)

    Sub REMOVEDECLARATION
    -Executes when a guild declaration is removed.
    (Parameter 1 = Guild Number, Parameter 2 = Declaration Number)

    Sub PAYGUILD
    -Executes when a player puts money into a guild. (/guild pay [Amount])
    (Parameter 1 = Guild Number, Parameter 2 = Amount)

    Sub GUILDCHAT
    -Executes when a player sents a guild message. (/guild chat [Message])
    (Parameter 1 = Guild Number, Parameter 2 = Message (String))

    Sub DISBANDGUILD
    -Executes when a guild is disband.
    (Parameter 1 = Guild Number)

    Sub BUYGUILDHALL
    -Executes when a guild purchases a guild hall.
    (Parameter 1 = Hall Number, Parameter 2 = Guild Number)

    Sub LEAVEGUILDHALL
    -Executes when a guild leaves a guild hall.
    (Parameter 1 = Hall Number, Parameter 2 = Guild Number)

    Function USEOBJ or USEOBJ#
    -Executes when a player uses any object, or a certain object number.
    (Parameter 1 = Object Number, Parameter 2 = Inventory Slot)

    Function UNUSEOBJ or UNUSEOBJ#
    -No apparent use.
    (Parameter 1 = Equipment type.)


    Sub GUILDBALANCE
    -Executes when a player checks a guilds balance. (/guild balance)
    (Parameter 1 = Guild Number, Parameter 2 = Balance)

    Function NPCTRADE or NPCTRADE#
    -Executes when any NPC trades an object, or when a certain NPC trades an object.
    (Parameter 1 = NPC Number)

    Function BUYOBJ#
    -Executes when a player buys a certain object number from an NPC.
    (Parameter 1 = Object Player will Receive, Parameter 2 = Value of Recieved object, Parameter 3 = Object player gives up, Parameter 4 = Value of given object.)

    Function SELLOBJ#
    -Executes when a player sells a certain object number to an NPC.
    (Parameter 1 = Object Player will Receive, Parameter 2 = Value of Recieved object, Parameter 3 = Object player gives up, Parameter 4 = Value of given object.)

    Function TRADEOBJ
    -Executes when a player trades any object with an NPC.
    (Parameter 1 = Object Player will Receive, Parameter 2 = Value of Recieved object, Parameter 3 = Object player gives up, Parameter 4 = Value of given object.)

    Sub DEPOSIT
    -Executes when a payer deposits money into the bank. (/deposit (amount))
    (Parameter 1 = Amount)

    Sub WITHDRAW
    -Executes when a player withdraws monster from the bank. (/withdraw [amount])
    (Parameter 1 = Amount)

    Sub BALANCE
    -Executes when a player checks their balance in the bank. (/balance)
    (Parameter 1 = Amount)

    Function GODEDITSCRIPT
    -Executes when a god edits any script. (/god editscript [Script Name])
    (Parameter 1 = Script Name (String))

    Function GODUPLOADSCRIPT
    -Executes when a god uploads any script.
    (Parameter 1 = Script Name (String))

    Function COMMAND
    -Executes when any player uses a command.
    (Parameter 1 = Word1 (String), Parameter 2 = Word2 (String), Parameter 3 = Word3 (String), Parameter 4 = Word4 (String), Parameter 5 = Word5 (String))

    Function EDITMAP
    -Executes when a player opens the map editor. (/god editmap)
    (Parameter 1 = Map Number)

    Sub DESTROYWALL or DESTROYWALL[Map Number]_[X Location]_[Y Location]
    -No apparent use.
    (Parameter 1 = Map, Parameter 2 = X, Parameter 3 = Y)


    Sub CLICKMAP or CLICKMAP#
    -Executes when a player clicks anywhere on any map, or a certain map number.
    (Parameter 1 = MAP, Parameter 2 = X, Parameter 3 = Y)

    Function CONNECT
    -Executes when a player connects to the sever.
    (Parameter 0 = Connecting Player's IP(String))

    Sub PARTGAME
    -Executes when a player leaves the game.

    Function DAYTIME
    -Executes when it becomes daytime.

    Function NIGHTTIME
    -Executes when it becomes nighttime.

    Function MONSTERATTACK or MONSTERATTACK#
    -Executes when any monster attacks a player, or a certain monster number attacks a player.
    (Parameter 1 = Map Monster Number (0-5), Parameter 2 = Monster Number (1-255))

    Sub MINUTETIMER
    -Executes once every minute.

    Sub BOOT
    -Executes once when the server is started.

    Sub CHANGEDIRECTION
    -Executes when a player changes direction.
    (Parameter 1 = New Direction)
     

Share This Page