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

Need help with my script!

coolashe

New Member
Joined
Oct 4, 2007
Messages
57
Reaction score
1
Hello, I've made a action script for my server but when i use it the client crash. The script is based when u click on a lever you will get teleported and it will take money from you. It's working good but the client crash. You get teleported but the client gets debug. Here is the script. I hope someone can help me out.

Code:
--SCRIPT BY ASHE
function onUse(cid, item, frompos, item2, topos)
        crystalCoins = getPlayerItemCount(cid, 2160)
        platinumCoins = getPlayerItemCount(cid, 2152)
        goldCoins = getPlayerItemCount(cid, 2148)
        money = crystalCoins * 10000 + platinumCoins * 100 + goldCoins
    if item.uid == 7035 and item.itemid == 1945 and getPlayerLevel(cid) >= 220 and money >= 100000 then
	doPlayerRemoveMoney(cid,100000)
        playerpos = {x=238, y=223, z=5, stackpos=253} 
        player = getThingfromPos(playerpos)                            
        nplayerpos = {x=563, y=457, z=7, stackpos=253}
	doSendMagicEffect(playerpos,2) 
        doTeleportThing(cid,nplayerpos)
        doSendMagicEffect(nplayerpos,10)    
        doPlayerSendTextMessage(cid,18,"Welcome to the Forbidden Kingdom!")
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_LBLUE, "Muahuahau I've taken 100k from you!")
	else
        doPlayerSendCancel(cid,"You need level 220 and have 100k to use this teleport.")
    end
	return 1
end

Thank's

Edit: Im using tfs 0.2 8.22 with the newest rev.
 
Back
Top