• 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 NPC using GM commands

Omegha

New Member
Joined
Jan 5, 2013
Messages
20
Reaction score
3
Hi!
Simple question - how can I make NPC use GM commands? Something like: selfSay('/addskill ' .. getCreatureName(cid) .. ', sword', cid)

Thanks for any help.
 
Last edited:
By using the lua functions these commands would call..
This was used back in the 8.0 XML server time, but npc's shouldn't be able to call commands nowadays.
 
That's sad. The problem is, that using /addskill is much easier, than creating a function in lua with doPlayerAddSkillTry. If there is no other way, then thank you anyways...
 
In the .xml of npc put access="5".
XML:
<npc name="examp" script="example.lua" access="5" walkinterval="2000" floorchange="0">
and in .lua you can execute commands with
Lua:
doCreatureExecuteTalkAction(cid, "/addskill player, level, 100")
 
Thanks for help, but unfortunately, I have no such lua function in my distro.
[9.60/9.61] The Forgotten Server v0.2.14 (Mystic Spirit)

I've already found other solution, with doPlayerAddSkillTry, but that was problematic.
That doesn't mean, that I am not interested in NPC using GM commands anymore though.
 
Back
Top