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

Example Of Scripting

Lil Sweetie

New Member
Joined
Aug 5, 2009
Messages
15
Reaction score
0
Hello, this is an example of a my scripting skills ^^

It's for marijuana :p


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

doSendMagicEffect(frompos,2)
queststatus = getPlayerStorageValue(cid,99980)

if doPlayerRemoveItem(cid,2800,1) == 1 then
if queststatus == -1 then
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerAddHealth(cid,-100)
setPlayerStorageValue(cid,99980,1)
return 1
end

if queststatus == 1 then
setPlayerStorageValue(cid,99980,2)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerAddHealth(cid,-500)
return 1
end

if queststatus == 2 then
setPlayerStorageValue(cid,99980,3)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerAddHealth(cid,-1000)
return 1
end

if queststatus == 3 then
setPlayerStorageValue(cid,99980,4)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerSay(cid,"-breathes heavy-",2)
doPlayerSay(cid,"I am so high right now...",2)
doPlayerAddHealth(cid,-2000)
return 1
end

if queststatus == 4 then
setPlayerStorageValue(cid,99980,-1)
doPlayerSendTextMessage(cid,21,"You take a puff of weed.")
doPlayerSay(cid,"~~Weed!~",2)
doPlayerSay(cid,"Aaaaaaaaaaaahhhhhhhhhh.......",2)
doPlayerSay(cid,"-passes out-",2)
doPlayerAddHealth(cid,-3000)
doPlayerAddMana(cid,500)
return 1
end
elseif doPlayerRemoveItem(cid,2800,1) == 0 then
doPlayerSendTextMessage(cid,21,"You need marijuana.")
return 0
end
end


Enjoy !! x]
 
Ops

I thought that it was in this one cuz it was relied to my tutor staff apply
nvm sorry
 
Well, maybe you could edit your post and add "Applying for Tutor position.".

^_^
 
well if u can actually script I do have some events that I need to get done, perhaps you and Tidus could help eachother, I will talk to you in game and we will try to get something started, you wont get staff right away..you have to show you can actually help the OT.

Thanks Archez for teaching people how to correctly post on forums lol, sometimes you get new players that don't really know the rules yet :/

Love, Lockjoint
 
Back
Top