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

Action Taming mount 9.44

Nerkoerko

Banned User
Joined
Feb 28, 2009
Messages
402
Reaction score
5
Location
Polska
War_Bear.gif

Code:
[COLOR="#0000CD"]<action[/COLOR] [COLOR="#FF0000"]actionid[/COLOR]=[COLOR="#0000CD"]"5907"[/COLOR] [COLOR="#FF0000"]event[/COLOR]=[COLOR="#0000CD"]"script"[/COLOR] [COLOR="#FF0000"]value[/COLOR]=[COLOR="#0000CD"]"mounts/warbear.lua"/>[/COLOR]

Code:
[COLOR="#0000CD"]function[/COLOR] onUse(cid,item,fromPosition,itemEx,toPosition)

[COLOR="#0000CD"]local[/COLOR] warbear = {["bear"] = {},}

[COLOR="#0000CD"]if[/COLOR] (not isCreature(itemEx.uid)) then

[COLOR="#0000CD"]return false[/COLOR]
[COLOR="#0000CD"]end[/COLOR]

mount = warbear [getCreatureName(itemEx.uid):lower()]

[COLOR="#0000CD"]if[/COLOR] getPlayerStorageValue(cid, [COLOR="#FF8C00"]2003[/COLOR]) == [COLOR="#FF8C00"]1[/COLOR] [COLOR="#0000CD"]then[/COLOR]
doPlayerSay(cid,"You already have War Bear mount.",TALKTYPE_ORANGE_1)

[COLOR="#0000CD"]elseif[/COLOR] (not mount) [COLOR="#0000CD"]then[/COLOR]
doPlayerSay(cid,"Use the slingshot to a bear.",TALKTYPE_ORANGE_1)

[COLOR="#0000CD"]elseif[/COLOR] ([COLOR="#800080"]math.random[/COLOR]([COLOR="#FF8C00"]100[/COLOR]) <= [COLOR="#FF8C00"]10[/COLOR]) [COLOR="#0000CD"]then[/COLOR]
doPlayerSay(cid,"You tamed the wild bear.",TALKTYPE_ORANGE_1)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE , 'Congratulations! You earned the achievement "Natural Born Cowboy".')
doSendMagicEffect(toPosition, [COLOR="#FF8C00"]2[/COLOR])
doRemoveItem(item.uid)
doRemoveCreature(itemEx.uid)
doPlayerAddMount(cid, [COLOR="#FF8C00"]3[/COLOR])
setPlayerStorageValue(cid, [COLOR="#FF8C00"]2003[/COLOR], [COLOR="#FF8C00"]1[/COLOR])

[COLOR="#0000CD"]elseif[/COLOR] ([COLOR="#800080"]math.random[/COLOR]([COLOR="#FF8C00"]100[/COLOR]) <= [COLOR="#FF8C00"]5[/COLOR]) [COLOR="#0000CD"]then[/COLOR]
doPlayerSay(cid,"Your slingshot has been broken.",TALKTYPE_ORANGE_1)
doSendMagicEffect(toPosition, [COLOR="#FF8C00"]3[/COLOR])
doRemoveItem(item.uid)

[COLOR="#0000CD"]elseif[/COLOR] ([COLOR="#800080"]math.random[/COLOR]([COLOR="#FF8C00"]100[/COLOR]) <= [COLOR="#FF8C00"]50[/COLOR]) [COLOR="#0000CD"]then[/COLOR]
doSendMagicEffect(toPosition, [COLOR="#FF8C00"]2[/COLOR])
doRemoveCreature(itemEx.uid)

[COLOR="#0000CD"]elseif[/COLOR] ([COLOR="#800080"]math.random[/COLOR]([COLOR="#FF8C00"]100[/COLOR]) <= [COLOR="#FF8C00"]35[/COLOR]) [COLOR="#0000CD"]then[/COLOR]
doPlayerSay(cid,"The bear is trying to hit you with its claws",TALKTYPE_ORANGE_1)

[COLOR="#0000CD"]return false[/COLOR]
[COLOR="#0000CD"]else[/COLOR]
doPlayerSay(cid,"The bear is trying to hit you with its claws",TALKTYPE_ORANGE_1)
[COLOR="#0000CD"]end[/COLOR]
[COLOR="#0000CD"]end[/COLOR]

scaled.php


scaled.php
 
Last edited:
Back
Top