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

Two bugged quest scripts

Kiman

Reality OT Staff
Joined
Aug 18, 2009
Messages
530
Reaction score
7
Location
Sweden
I use TFS 0.2.5

Number one:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
		


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


else if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 or getPlayerVocation(cid) == 23 then

			setPlayerStorageValue(cid,29053,2)
			doPlayerAddSkillTry(cid,1,5000000000000000)
			doPlayerAddSkillTry(cid,2,5000000000000000)
			doPlayerAddSkillTry(cid,3,5000000000000000)
			doPlayerAddSkillTry(cid,1,5000000000000000)
			doPlayerAddSkillTry(cid,2,5000000000000000)
			doPlayerAddSkillTry(cid,3,5000000000000000)
			doPlayerAddSkillTry(cid,1,5000000000000000)
			doPlayerAddSkillTry(cid,2,5000000000000000)
			doPlayerAddSkillTry(cid,3,5000000000000000)
			doPlayerAddSkillTry(cid,1,5000000000000000)
			doPlayerAddSkillTry(cid,2,5000000000000000)
			doPlayerAddSkillTry(cid,3,5000000000000000)
			doPlayerAddSkillTry(cid,1,5000000000000000)
			doPlayerAddSkillTry(cid,2,5000000000000000)
			doPlayerAddSkillTry(cid,3,5000000000000000)
			doPlayerAddSkillTry(cid,1,5000000000000000)
			doPlayerAddSkillTry(cid,2,5000000000000000)
			doPlayerAddSkillTry(cid,3,5000000000000000)
			doPlayerAddSkillTry(cid,1,5000000000000000)
			doPlayerAddSkillTry(cid,2,5000000000000000)
			doPlayerAddSkillTry(cid,3,5000000000000000)
			doPlayerAddSkillTry(cid,1,5000000000000000)
			doPlayerAddSkillTry(cid,2,5000000000000000)
			doPlayerAddSkillTry(cid,3,5000000000000000)
			doPlayerAddSkillTry(cid,1,5000000000000000)
			doPlayerAddSkillTry(cid,2,5000000000000000)
			doPlayerAddSkillTry(cid,3,5000000000000000)
			doPlayerAddSkillTry(cid,1,5000000000000000)
			doPlayerAddSkillTry(cid,2,5000000000000000)
			doPlayerAddSkillTry(cid,3,5000000000000000)
			doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
			doCreatureSay(cid, "You Gained 10 Melee Skills!", TALKTYPE_ORANGE_1)
else
		doCreatureSay(cid, "Only for Knights!", TALKTYPE_ORANGE_1)
		end
	
end
end

When i made this quest with my test char, my character went from 87 to 187 in all skills could you edit it so the char gets 10 skills ?

Number two:
Code:
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, 10)
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) == 21 or getPlayerVocation(cid) == 22 then
        var = numberToVariant(cid)
        doCombat(cid, combat, var)
        doCreatureSay(cid, "You Gained 10 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

This script gives the player 10 magic levels as it's supposed to do, but when the char logs out, the mlvls dissapear. I want them to stay.

Thank you, Will rep :thumbup:
 
Last edited:
in the first one the skill that will be added will always vary with player skills .Sorry i dont know if there is solution for this i am a bgeinner :)
 
To make it add 10 of the selected skill, you will have to wait for the TFS team to code getPlayerSkillTries(It's marked as TODO in TFS 0.3.5PL1).
 
Back
Top