Well, In my Server Real Map Project v0.8 - Based on Mystic Spirit v0.2.2, the oracle is bad, i need one script and one npc called The Oracle, who you have to choise where you wanna live and what vocation you choise.. please thanks
And i have a the oracle who dont make you the voc, and only teleport you to the city, but dont make resident of the city... I NEED HELP PLEASE!
<?xml version="1.0" encoding="UTF-8"?>
<npc name="The Oracle" floorchange="0" walkinterval="0">
<health now="150" max="150"/>
<look typeex="1448"/>
<interaction range="3" idletime="30">
<interact keywords="hi" focus="1">
<!--These are the keywords will trigger this interaction-->
<keywords>hello</keywords>
<keywords>greet</keywords>
<response>
<action name="script">
<!--
if(getPlayerVocation(cid) ~= 0) then
selfSay("SORRY, YOU HAVE ALREADY MADE YOUR CHOICE IN LIFE!")
_state.isidle = true
return
end
-->
if(getPlayerLevel(cid)) >= 8 then
selfSay(getCreatureName(cid) .. ", ARE YOU PREPARED O FACE YOUR DESTINY?")
_state.b1 = (isPremium(cid) == TRUE)
_state.topic = 1
else
selfSay("CHILD! COME BACK WHEN YOU HAVE GROWN UP!")
_state.isidle = true
end
</action>
</response>
</interact>
<interact keywords="yes" topic="1">
<!--Premium account, b1 is set in above-->
<response b1="1" text="IN WHICH TOWN DO YOU WANT TO LIVE: CARLIN, EDRON, THAIS, OR VENORE?">
<action name="topic" value="2"/>
</response>
<!--Normal account-->
<response text="IN WHICH TOWN DO YOU WANT TO LIVE: CARLIN, THAIS, OR VENORE?">
<action name="topic" value="2"/>
</response>
</interact>
<interact keywords="[COLOR="Red"][B]carlin[/B][/COLOR]" topic="2">
<response text="IN CARLIN! AND WHAT PROFESSION HAVE YOU CHOSEN: KNIGHT, PALADIN, SORCERER, OR DRUID?">
<action name="script">
_state.n1 = [COLOR="Red"][B]2[/B][/COLOR] [COLOR="Blue"][B]--Town id that you want to be set for the player if they choose that city--[/B][/COLOR]
_state.topic = 3
</action>
</response>
</interact>
<interact keywords="[COLOR="#ff0000"][B]thais[/B][/COLOR]" topic="2">
<response text="IN THAIS! AND WHAT PROFESSION HAVE YOU CHOSEN: KNIGHT, PALADIN, SORCERER, OR DRUID?">
<action name="script">
_state.n1 = [COLOR="Red"][B]5[/B][/COLOR] [COLOR="Blue"][B]--Town id that you want to be set for the player if they choose that city--[/B][/COLOR]
_state.topic = 3
</action>
</response>
</interact>
<interact keywords="[COLOR="#ff0000"][B]venore[/B][/COLOR]" topic="2">
<response text="IN VENORE! AND WHAT PROFESSION HAVE YOU CHOSEN: KNIGHT, PALADIN, SORCERER, OR DRUID?">
<action name="script">
_state.n1 = [COLOR="#ff0000"][B]6[/B][/COLOR] [COLOR="Blue"][B]--Town id that you want to be set for the player if they choose that city--[/B][/COLOR]
_state.topic = 3
</action>
</response>
</interact>
<interact keywords="[COLOR="#ff0000"][B]edron[/B][/COLOR]" topic="2">
<response text="YOU NEED A PREMIUM ACCOUNT IN ORDER TO GO THERE!">
<!--Set the topic back to 2, ie. choose a new town.-->
<action name="topic" value="2"/>
</response>
<!--b1: premium account, see <interact keywords="hi" focus="1"> where _state.b1 is is set.-->
<response b1="1" text="IN EDRON! AND WHAT PROFESSION HAVE YOU CHOSEN: KNIGHT, PALADIN, SORCERER, OR DRUID?">
<action name="script">
_state.n1 = [COLOR="#ff0000"][B]9[/B][/COLOR] [COLOR="Blue"][B]--Town id that you want to be set for the player if they choose that city--[/B][/COLOR]
_state.topic = 3
</action>
</response>
</interact>
<!--If the player does not say any city, repeat our question-->
<interact keywords="|*|" topic="2">
<response b1="1" text="WHICH CITY DO YOU WISH TO LIVE IN? CARLIN, EDRON, THAIS, OR VENORE?"/>
<response text="WHICH CITY DO YOU WISH TO LIVE IN? CARLIN, EDRON, THAIS, OR VENORE?"/>
</interact>
<interact keywords="sorcerer" topic="3">
<response text="A SORCERER! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
<!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
<action name="script">
_state.n2 = 1
_state.topic = 4
</action>
</response>
</interact>
<interact keywords="druid" topic="3">
<response text="A DRUID! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
<!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
<action name="script">
_state.n2 = 2
_state.topic = 4
</action>
</response>
</interact>
<interact keywords="paladin" topic="3">
<response text="A PALADIN! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
<!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
<action name="script">
_state.n2 = 3
_state.topic = 4
</action>
</response>
</interact>
<interact keywords="knight" topic="3">
<response text="A KNIGHT! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!">
<!--n2: 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight-->
<action name="script">
_state.n2 = 4
_state.topic = 4
</action>
</response>
</interact>
<!--If the player does not say any profession, repeat our question-->
<interact keywords="|*|" topic="3">
<response text="KNIGHT, PALADIN, SORCERER, OR DRUID?"/>
</interact>
<interact keywords="yes" topic="4">
<response>
<action name="script">
local pos = 0
if(_state.n1 == [COLOR="Red"][B]2[/B][/COLOR]) then [COLOR="Blue"][B]--Change this to your first towns id--[/B][/COLOR]
pos = {x=[COLOR="#ff0000"][B]32360[/B][/COLOR], y=[COLOR="#ff0000"][B]31782[/B][/COLOR], z=[COLOR="#ff0000"][B]7[/B][/COLOR]} --[COLOR="Blue"][B]Change this to your number 1 city location[/B][/COLOR]--
elseif(_state.n1 == [COLOR="Red"][B]9[/B][/COLOR]) then [COLOR="Blue"][B]--Change this to your second towns id--[/B][/COLOR]
pos = {x=[COLOR="Red"][B]33217[/B][/COLOR], y=[COLOR="#ff0000"][B]31814[/B][/COLOR], z=[COLOR="#ff0000"][B]8[/B][/COLOR]} --[COLOR="Blue"][B]Change this to your number 2 city location[/B][/COLOR]--
elseif(_state.n1 == [COLOR="#ff0000"][B]5[/B][/COLOR]) then [COLOR="Blue"][B]--Change this to your third towns id--[/B][/COLOR]
pos = {x=[COLOR="#ff0000"][B]32369[/B][/COLOR], y=[COLOR="#ff0000"][B]32241[/B][/COLOR], z=[COLOR="#ff0000"][B]7[/B][/COLOR]} --[COLOR="Blue"][B]Change this to your number 3 city location[/B][/COLOR]--
elseif(_state.n1 == [COLOR="#ff0000"][B]6[/B][/COLOR]) then [COLOR="Blue"][B]--Change this to your fourth towns id--[/B][/COLOR]
pos = {x=[COLOR="#ff0000"][B]32957[/B][/COLOR], y=[COLOR="#ff0000"][B]32076[/B][/COLOR], z=[COLOR="#ff0000"][B]7[/B][/COLOR]} --[COLOR="Blue"][B]Change this to your number 4 city location[/B][/COLOR]--
else
selfSay("I DO NOT KNOW WHAT PROFESSION THAT IS, ASK THE GODS FOR GUIDANCE!")
return
end
selfSay("SO BE IT!")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doTeleportThing(cid, pos)
doPlayerSetTown(cid, _state.n1)
if _state.n2 == 4 and doPlayerSetTown(cid, _state.n1) then
doPlayerSetVocation(cid, _state.n2)
[COLOR="#0000ff"] doPlayerAddItem(cid,8602,1) [COLOR="#0000ff"]--Knight starting Items[/COLOR]
doPlayerAddItem(cid,2428,1) [COLOR="#0000ff"]--Knight starting Items[/COLOR]--
doPlayerAddItem(cid,2439,1) [COLOR="#0000ff"]--Knight starting Items[/COLOR]--
doPlayerAddItem(cid,2465,1) [COLOR="#0000ff"]--Knight starting Items[/COLOR]--
doPlayerAddItem(cid,2525,1) [COLOR="#0000ff"]--Knight starting Items[/COLOR]--
doPlayerAddItem(cid,2152,15) [/COLOR] [COLOR="#0000ff"]--Knight starting Items[/COLOR]
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
elseif _state.n2 == 3 and doPlayerSetTown(cid, _state.n1) then
doPlayerSetVocation(cid, _state.n2)
[COLOR="Blue"]doPlayerAddItem(cid,2389,10)[/COLOR] [COLOR="#0000ff"]--Paladin starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,2525,1)[/COLOR] [COLOR="#0000ff"]--Paladin starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,2486,1)[/COLOR] [COLOR="#0000ff"]--Paladin starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,8923,1)[/COLOR] [COLOR="#0000ff"]--Paladin starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,2152,15)[/COLOR] [COLOR="#0000ff"]--Paladin starting Items[/COLOR]--
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
elseif _state.n2 == 1 and doPlayerSetTown(cid, _state.n1) then
doPlayerSetVocation(cid, _state.n2)
[COLOR="#0000ff"]doPlayerAddItem(cid,2190,1)[/COLOR] [COLOR="#0000ff"]--Sorcerer starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,2525,1)[/COLOR] [COLOR="#0000ff"]--Sorcerer starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,8820,1)[/COLOR] [COLOR="#0000ff"]--Sorcerer starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,8819,1)[/COLOR] [COLOR="#0000ff"]--Sorcerer starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,2152,15)[/COLOR] [COLOR="#0000ff"]--Sorcerer starting Items[/COLOR]--
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
elseif _state.n2 == 2 and doPlayerSetTown(cid, _state.n1) then
doPlayerSetVocation(cid, _state.n2)
[COLOR="#0000ff"]doPlayerAddItem(cid,2182,1)[/COLOR] [COLOR="#0000ff"]--Druid starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,2525,1)[/COLOR] [COLOR="#0000ff"]--Druid starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,8820,1)[/COLOR] [COLOR="#0000ff"]--Druid starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,8819,1)[/COLOR] [COLOR="#0000ff"]--Druid starting Items[/COLOR]--
[COLOR="#0000ff"]doPlayerAddItem(cid,2152,15)[/COLOR] [COLOR="#0000ff"]--Druid starting Items[/COLOR]--
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
</action>
<action name="idle" value="1"/>
</response>
</interact>
<interact keywords="bye" focus="0">
<keywords>farewell</keywords>
<response text="Good bye. Recommend us, if you were satisfied with our service."/>
</interact>
<!--
If the event onBusy exists, the npc will make a queue like Tibia, if the event is removed
the npc will be able to talk to all customers at the same time without problems.
-->
<interact event="onBusy">
<response text="WAIT UNTIL IT IS YOUR TURN!">
<action name="addqueue" value="|PLAYER|"/>
</response>
</interact>
<!--This event triggers if the player goes to far away from the npc/logout/idle timeout-->
<interact event="onPlayerLeave" focus="0">
<response text="COME BACK WHEN YOU ARE PREPARED TO FACE YOUR DESTINY!"/>
</interact>
</interaction>
</npc>
Really Thanks Bro , U help me a lot, thanks ^^