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

Requesting a script for TFS 0.3.4

Joined
Jun 19, 2009
Messages
1,852
Reaction score
5
Hey...

I need a "statue script" (onUse), when you click the Statue, if you are a knight, you get 5 skills (club, axe and sword), if ur a mage, u get 5 magic lvls and if ur a pally u get 5 distance..

Or, you can do it one by one? I mean one script for each vocation if you like :)
 
But will this work?
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 60000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICPOINTS, 5)
setCombatCondition(combat, condition)

function onUse(cid, item, frompos, item2, topos)
    if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 or getPlayerVocation(cid) == 9 or getPlayerVocation(cid) == 10 then
        var = numberToVariant(cid)
        doCombat(cid, combat, var)
        doCreatureSay(cid, "You Gained 5 Magic Levels! You can only get this power once!", TALKTYPE_ORANGE_1)
    else
       doCreatureSay(cid, "Only Mages can handle this power!", TALKTYPE_ORANGE_1)
        return 0
    end
    return 1
end
 
Or will this work?
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
		


if item.uid == 29052 and getPlayerStorageValue(cid,29052) == 2 then
			doCreatureSay(cid, "You have already recieved this power!", TALKTYPE_ORANGE_1)


else if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 or getPlayerVocation(cid) == 12 then

			setPlayerStorageValue(cid,29052,2)
			doPlayerAddSkillTry(cid,4,5000000000000000)
			doPlayerAddSkillTry(cid,4,5000000000000000)
			doPlayerAddSkillTry(cid,4,5000000000000000)
                        doPlayerAddSkillTry(cid,4,5000000000000000)
                        doPlayerAddSkillTry(cid,4,5000000000000000)
			doPlayerAddMagLevel(cid,5)

			doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
			doCreatureSay(cid, "You Gained 10 Distance Skills!", TALKTYPE_ORANGE_1)

else
		doCreatureSay(cid, "Only for Paladins!", TALKTYPE_ORANGE_1)
		end
	
end
end

Will this give me 5 dists? Cmon guys answer
 
Back
Top Bottom