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

CreatureEvent [onAdvance] Pick a vocation

it work in tfs ?

what i need to add in creaturescripts.xml?

ty ;p
 
Last edited:
This is genious, with this, you can make an lvlup island map. 1 island thats only for lvl 1 - 50, and at lvl 51 they get teleproted to a only vll 51 - 70 island, and etc...
 
@Komic
ill get right to that :)

EDIT:
It will send either the red, blue or yellow effect.. it is randomized. (to edit this just change local effect)

data\creaturescripts\scripts\advances/level.lua
Code:
--onAdvance system by 4220niller

function onAdvance(cid, oldlevel, newlevel)
	if newlevel == 100 then
		local ppos = getPlayerPosition(cid)
		local positions = {
			{x=ppos.x-3, y=ppos.y-1, z=ppos.z},
			{x=ppos.x-1, y=ppos.y-1, z=ppos.z},
			{x=ppos.x, y=ppos.y-1, z=ppos.z},
			{x=ppos.x+1, y=ppos.y-1, z=ppos.z},
			{x=ppos.x+3, y=ppos.y-1, z=ppos.z},
			{x=ppos.x+4, y=ppos.y-1, z=ppos.z},
			{x=ppos.x+5, y=ppos.y-1, z=ppos.z},
			
			{x=ppos.x-3, y=ppos.y, z=ppos.z},
			{x=ppos.x-1, y=ppos.y, z=ppos.z},
			{x=ppos.x+1, y=ppos.y, z=ppos.z},
			{x=ppos.x+3, y=ppos.y, z=ppos.z},
			{x=ppos.x+5, y=ppos.y, z=ppos.z},
			
			{x=ppos.x-3, y=ppos.y+1, z=ppos.z},
			{x=ppos.x-1, y=ppos.y+1, z=ppos.z},
			{x=ppos.x, y=ppos.y+1, z=ppos.z},
			{x=ppos.x+1, y=ppos.y+1, z=ppos.z},
			{x=ppos.x+3, y=ppos.y+1, z=ppos.z},
			{x=ppos.x+4, y=ppos.y+1, z=ppos.z},
			{x=ppos.x+5, y=ppos.y+1, z=ppos.z},
		}
		local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE)
		for i = 1, table.getn(positions) do
			doSendMagicEffect(positions[i],effect)
		end
	end
end


How to do to spell this effect like 5 times, one after one? U know just one time player can't see it good ;P Can u help how to do that?
 
@Inteligentny, do you used 4220niller's version of onAdvance? or this one which was done in TFS?
 
Im using 4220niller version onAdvance... I had problems with get it work but finally its working on tfs 0.2 :> why u ask ?
 
I'm not sure what it will work, but anyway, I tryed :D

PHP:
function Advancemsg(param)
		local ppos = getPlayerPosition(cid)
		local positions = {
			{x=ppos.x-3, y=ppos.y-1, z=ppos.z},
			{x=ppos.x-1, y=ppos.y-1, z=ppos.z},
			{x=ppos.x, y=ppos.y-1, z=ppos.z},
			{x=ppos.x+1, y=ppos.y-1, z=ppos.z},
			{x=ppos.x+3, y=ppos.y-1, z=ppos.z},
			{x=ppos.x+4, y=ppos.y-1, z=ppos.z},
			{x=ppos.x+5, y=ppos.y-1, z=ppos.z},
			
			{x=ppos.x-3, y=ppos.y, z=ppos.z},
			{x=ppos.x-1, y=ppos.y, z=ppos.z},
			{x=ppos.x+1, y=ppos.y, z=ppos.z},
			{x=ppos.x+3, y=ppos.y, z=ppos.z},
			{x=ppos.x+5, y=ppos.y, z=ppos.z},
			
			{x=ppos.x-3, y=ppos.y+1, z=ppos.z},
			{x=ppos.x-1, y=ppos.y+1, z=ppos.z},
			{x=ppos.x, y=ppos.y+1, z=ppos.z},
			{x=ppos.x+1, y=ppos.y+1, z=ppos.z},
			{x=ppos.x+3, y=ppos.y+1, z=ppos.z},
			{x=ppos.x+4, y=ppos.y+1, z=ppos.z},
			{x=ppos.x+5, y=ppos.y+1, z=ppos.z},
		}
		local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE)
		for i = 1, table.getn(positions) do
			doSendMagicEffect(positions[i],effect)
		end
end



function onAdvance(cid, oldlevel, newlevel)
	if newlevel == 100 then
	addEvent(Advancemsg, 500, param)
	addEvent(Advancemsg, 1000, param)
	addEvent(Advancemsg, 1500, param)
addEvent(Advancemsg, 2000, param)
addEvent(Advancemsg, 2500, param)
	end
end
 
It's not :p It is too complicated for me, I dont know what those errors means :<

here is ss:

errtf8.jpg


anyone can make this script working?:p
 
Last edited:
PHP:
function Advancemsg(param) 
        local ppos = getCreaturePosition(cid) 
        local positions = { 
            {x=ppos.x-3, y=ppos.y-1, z=ppos.z}, 
            {x=ppos.x-1, y=ppos.y-1, z=ppos.z}, 
            {x=ppos.x, y=ppos.y-1, z=ppos.z}, 
            {x=ppos.x+1, y=ppos.y-1, z=ppos.z}, 
            {x=ppos.x+3, y=ppos.y-1, z=ppos.z}, 
            {x=ppos.x+4, y=ppos.y-1, z=ppos.z}, 
            {x=ppos.x+5, y=ppos.y-1, z=ppos.z}, 
             
            {x=ppos.x-3, y=ppos.y, z=ppos.z}, 
            {x=ppos.x-1, y=ppos.y, z=ppos.z}, 
            {x=ppos.x+1, y=ppos.y, z=ppos.z}, 
            {x=ppos.x+3, y=ppos.y, z=ppos.z}, 
            {x=ppos.x+5, y=ppos.y, z=ppos.z}, 
             
            {x=ppos.x-3, y=ppos.y+1, z=ppos.z}, 
            {x=ppos.x-1, y=ppos.y+1, z=ppos.z}, 
            {x=ppos.x, y=ppos.y+1, z=ppos.z}, 
            {x=ppos.x+1, y=ppos.y+1, z=ppos.z}, 
            {x=ppos.x+3, y=ppos.y+1, z=ppos.z}, 
            {x=ppos.x+4, y=ppos.y+1, z=ppos.z}, 
            {x=ppos.x+5, y=ppos.y+1, z=ppos.z}, 
        } 
        local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE) 
        for i = 1, table.getn(positions) do 
            doSendMagicEffect(positions[i],effect) 
        end 
end 



function onAdvance(cid, oldlevel, newlevel) 
    if newlevel == 100 then 
    addEvent(Advancemsg, 500, param) 
    addEvent(Advancemsg, 1000, param) 
    addEvent(Advancemsg, 1500, param) 
addEvent(Advancemsg, 2000, param) 
addEvent(Advancemsg, 2500, param) 
    end 
end

try maybe this one ;>
Anyway, it's a bit laggy way to make onAdvance... 0.2 didn't got it in sources?
 
0.2 havent build it I think... or I dont know how to use it :p

I'll edit post in while and tell if it work

edit:

its not :((


err2gb9.png
 
Last edited:
Back
Top