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

Lua help with chest quest please!

kaspertje100

Member
Joined
May 8, 2008
Messages
236
Reaction score
7
hi peeps,

I have a problem with my script:

Lua:
function onUse(cid, item, fromPos, item2, toPos)
    if getPlayerStorageValue(cid,5000) == -1 then	
		SetPlayerStorageValue(cid, 5000,1)
	    doPlayerAddItem(cid,8930,1)
		setPlayerStorageValue(cid, 4445,1)
		doCreatureSay(cid, "TEST", TALKTYPE_ORANGE_1)
	else
        doPlayerSendTextMessage(cid,22,"It is empty.")
    end		
	return false
end

so the problem is that my script doesn't give the player storage ID 5000 so you can keep using it and keep getting item ID 8930. It also doesn't add storage 4445? and it doesn't send the msg TEST or the msg It is empty ;s however it does give the sword.

and yes I did add unique ID 4445 in my mapeditor and in actions.xml:

HTML:
<action uniqueid="4445" event="script" value="other/hellgatechest.lua"/>

please help me out!

REP ++
 
Back
Top