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

Lua Script help

Exectric

New Member
Joined
Jun 6, 2007
Messages
25
Reaction score
0
I need a script, preferably XML for an 8.1 server. Server is Aries XML

I need basically a prestige thing, an npc that makes you level 1 without any of your previous stats, like it changes a knight into a sissy, and only a knight can do that, request is basically an "Oracle that changes you from one voc to another voc but you start over at level one, and you can only be a certain voc to do it.
 
I dont test it, because im not in my home now but i make this for you test it

Lua:
-- Aveo Script --

local knight = {4,8}
local level = getPlayerLevel(cid) - getPlayerLevel(cid) + 1
local newsvoc = math.random(1,3)

-- NPC Messages --
local npc_message ={

"You want Reset your experience and level?",
"Are you a Stronger Warrior YOU ARE SURE???", 
"You dont have vocation to make this...", 
"Take your new level, you have complete reset"
 }

									
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)

	if(not npcHandler:isFocused(cid)) then
		return false
			end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

        if(msgcontains(msg, 'reset')) then
			selfSay(npc_message[1], cid)
				end

		if(msgcontains(msg, 'yes')) then
			selfSay(npc_message[1], cid)
			talkState[talkUser] = 1
           end
		
		if (getPlayerVocation(cid,knight) > 0) then
			doPlayerSetVocation(cid,newsvoc)			
			doPlayerAddLevel(cid,level)
			doSendMagicEffect(getCreaturePosition(cid), 10)
			selfSay(npc_message[4], cid)
	
		else	

			doSendMagicEffect(getCreaturePosition(cid), 10)
				doCreatureSay(cid, "Im Not a Real warrior :(", TALKTYPE_ORANGE_1)
	end
		
			return true
				end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Back
Top