• 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!

Script request

alramo

New Member
Joined
May 25, 2009
Messages
197
Reaction score
0
Hello , my anihilator works 100% , but the problem is , they can take all the 4 items, and not just 1...i have tryied to read a bit about that but i couldnt understand and couldnt fix it...


I would like if someone could explain me step by step of how to fix that.....


I also need a Vip system , so i need to know a lil bit about that....i read around there all this things depends of the playerstoragevalue , but well..i dont understand much about it =P so i need help

and the last one....i need a script like this...

when you kill X creature, a teleport appears and it disappears after X time

thanks in advance ^^

i tryied to do last one but didnt work
 
PHP:
getPlayerStorageValue(cid,100)
+
PHP:
setPlayerStorageValue(cid,100,1)

That value needs to be the same on all chests.
That way, they can only choose one.

PHP:
function onUse(cid, item, frompos, item2, topos)

   	if item.uid == 5001 then
   		queststatus = getPlayerStorageValue(cid,100)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Demon Armor.")
   			doPlayerAddItem(cid,2494,1)
   			setPlayerStorageValue(cid,100,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
   	elseif item.uid == 5002 then
   		queststatus = getPlayerStorageValue(cid,100)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Sword of Valor.")
   			doPlayerAddItem(cid,2400,1)
   			setPlayerStorageValue(cid,100,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
   	elseif item.uid == 5003 then
   		queststatus = getPlayerStorageValue(cid,100)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Stonecutter's Axe.")
   			doPlayerAddItem(cid,2431,1)
   			setPlayerStorageValue(cid,100,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
   	elseif item.uid == 5004 then
   		queststatus = getPlayerStorageValue(cid,100)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Thunder Hammer.")
   			doPlayerAddItem(cid,2421,1)
   			setPlayerStorageValue(cid,100,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
	else
		return 0
   	end

   	return 1
end
 
Last edited:
You need to change all the chests uniqueID's with the Map Editor.

PHP:
<action uniqueid="5000" script="quests/chest.lua"/>
<action uniqueid="5001" script="quests/chest.lua"/>
<action uniqueid="5002" script="quests/chest.lua"/>
<action uniqueid="5003" script="quests/chest.lua"/>
<action uniqueid="5004" script="quests/chest.lua"/>

For your information.

5000 = Lever UNIQUE ID
5001 = Chest UNIQUE ID
5002 = Chest UNIQUE ID
5003 = Chest UNIQUE ID
5004 = Chest UNIQUE ID
 
Last edited:
but i got a problem , thatlever is already on my anihi script, so if i do that, it tells me

[Warning - Actions::registerEvent] Duplicate registered item uniqueid: 30015
[Warning - Actions::registerEvent] Duplicate registered item uniqueid: 30015

so...what if i take out that part from the script?
 
Back
Top