View Full Version : Do something on map enter

07-27-2013, 05:18 PM
As title says...

#include "ScriptPCH.h"

class OnMapEnter: public PlayerScript
OnMapEnter() : PlayerScript("OnMapEnter") {}

void OnPlayerEnterMap(Map* map, Player* player)
if (player->GetMapId() == 100)
player->AddItem(1337, 1);
//add stuff here

void AddSC_OnMapEnter()
new OnMapEnter();

This script will add you the item 1337 when entering the map 100 (just examples).
Pretty simple to edit and might be useful.

If you want more scripts like this (like onpvpkill, onlogin, etc...) just tell me and i will make/post them :)

07-27-2013, 05:31 PM
Great! Thanks for the release. :D