- Joined
- Aug 5, 2008
- Messages
- 1,581
- Reaction score
- 80
Ok here it goes, please all pro's look at the script and see if there is something wrong. This is my first try to script ever. You have to change the "XXXX" in the script.
The script works as followed; Player walk in a dungeon, step on a tile, it sents a message in orange on the screen and at the same time it summons a demon at a specific location also added questvalue so that the player can only do this one time.
Edit: Script now has a delay function and if 4 players enters a dungeon then the first player stepping on the tile will get a message and it will summon a monster. The 3 other players will not do any summons/or text messages.. until delay is over.
Code:
-- idea by frankfarmer/fragdonut and script by cykotitan
-- step on tile and summon monster
local t = {
storage = 32000, --storageid
interval = 60, --how many seconds until next
monster = {"Demon", {x=100, y=100, z=7}}, -- monster and coords
msg = "It's too quiet here..." -- message players get
}
function onStepIn(cid, item, position, fromPosition)
if os.difftime(os.time(), getGlobalStorageValue(t.storage)) >= t.interval then
doCreatureSay(cid, t.msg, TALKTYPE_ORANGE_1)
doSummonCreature(t.monster[1], t.monster[2])
setGlobalStorageValue(t.storage, os.time())
end
end
The script works as followed; Player walk in a dungeon, step on a tile, it sents a message in orange on the screen and at the same time it summons a demon at a specific location also added questvalue so that the player can only do this one time.
Edit: Script now has a delay function and if 4 players enters a dungeon then the first player stepping on the tile will get a message and it will summon a monster. The 3 other players will not do any summons/or text messages.. until delay is over.
Last edited: