Anyone have any examples on how to use the open command?

Discussions on development of both the EQ2Emulator LUA Script Engine and Script specifications

Moderator: Team Members

Post Reply
User avatar
Astal
Posts: 96
Joined: Tue Dec 09, 2008 1:35 pm

Anyone have any examples on how to use the open command?

Post by Astal » Tue Nov 24, 2009 2:36 pm

Like in scripts. Say i have a chest, i want a player to open, when he does have it give him, gear, summon mobs and then despawn, cant find anything on forums or wiki. If you cant do that atm, ill just make it on attack
I DIE FREE!!

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: Anyone have any examples on how to use the open command?

Post by Scatman » Tue Nov 24, 2009 3:15 pm

Use John's favorite function 'casted_on'. So give your box the "open" entity command and 'show_command_icon'=1. When you click on the box, the casted_on(NPC, Spawn, SpellName) will be ran. So something like this:

Code: Select all

function casted_on(NPC, Spawn, SpellName)
   if SpellName == "open" then
      SummonItem(Spawn, 500)
   end
end

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests