• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent Make Vocation ID 1-8 Group ID X

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,768
Solutions
5
Reaction score
769
Someone said that he need help with Makeing Vocation ID 1-8 Group ID X

This works on 0.3.6pl1 and 0.4 for sure
PS: NOT TESTED

goto ur creaturescript and add
GM.lua
Lua:
--Script by Amiroslo
function onLogin(cid)

local youv = getPlayerVocation(cid)

    if youv == 1 or youv == 2 or youv == 3 or youv == 4 or youv == 5 or youv == 6 or youv == 7 or youv == 8 then
        doPlayerSetGroupId(cid, 4)
        doPlayerSendTextMessage(cid,15,'You are a GM!')
	else
	    doPlayerSendTextMessage(cid,15,'You cant be a GM!')
	end
	return TRUE
end

and in ur creaturescript.xml
XML:
	<event type="login" name="GM" event="script" value="GM.lua"/>

and in ur login.lua
Lua:
		registerCreatureEvent(cid, "GM")

I dont think it helps or so, but why not making it? :p

Rep++ If it helped!
 
Code:
vocs = {1,2,3,4,5,6,7,8}
if isInArray(vocs, getPlayerVocation(cid)) then

or

Code:
if getPlayerVocation(cid) > 0 and getPlayerVocation(cid) < 9 then
 
Back
Top