• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Spamming Addevent

ziggy46802

Active Member
Joined
Aug 19, 2012
Messages
418
Reaction score
27
Here is my script:
Code:
function restore(cid)
			setPlayerStorageValue(cid, 1025, 1)
				end
				

function onUse(cid, item, frompos, item2, topos)
	if getPlayerStorageValue(cid, 1025) == 1
		then	
			setPlayerStorageValue(cid, 1025, 2)
			doSendMagicEffect(getPlayerPosition(cid), 13)	
			doCreatureSay(cid, "You have come across some marijuana.", TALKTYPE_ORANGE_1)
			doPlayerAddItem(cid, 5953, 1)
			else
				doCreatureSay(cid, "The plant has already been cut.", TALKTYPE_ORANGE_1)
				
				
				addEvent(restore, 10 *  1000, cid)
			end
			end

Now the problem is that you can get the marijuana from it, and then you have to wait 10 seconds, but then after the first 10 seconds are up, you can spam it and get one like every second. So what do I have to do like return false or return true or return 0 or what?

I'm posting this here because I posted it in support and got no help at all.



EDIT= Sorry, nevermind guys, it does work, it just didnt work in like "1 second "test mode"" but it works for longer periods of time. Sorry about posting it here too.
 
Back
Top