• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Use item x, summons a boss monster at X,Y,Z

froie

Expert Mapper
Joined
May 27, 2013
Messages
196
Reaction score
4
Location
Canada
Hello OTland!

The server I am currently using is:
The Forgotten Server, version 0.3.7_SVN (Crying Damson) (10.10)

I am hoping to get some help with a script. The current script I am using doesn't seem to be doing the job properly.. I am not very good at scripting so that may be the reason.

The purpose of this script was that when you use item X, it summons a boss monster at location X,Y,Z and the item is destroyed on use.

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 local time =
{
   sec = 30
}

    if getPlayerStorageValue(cid, 15321) == -1 then
       doSummonCreature("rat", {x=1182, y=1124, z=8})
       addEvent(funcSummonWarlock, time.sec * 1000)
       setPlayerStorageValue(cid, 15321, 1)
 end
 return TRUE
end
 
function funcSummonWarlock()
       doSummonCreature("rat", {x=1182, y=1124, z=8})
 return TRUE
end

It has been years since I found this code, so I am unsure where I got it. The code used to work and now all of a sudden it does not. I was hoping I could get some help with fixing it and adding an additional function that when you use the item and spawn the monster, the item breaks.
 
Back
Top