PDA

View Full Version : [Lua] SetSoulLinkedWith() Command



mager1794
07-07-09, 02:39 AM
In Order to Understand this you need a bit of LUA background follow this link to learn
SectorSevens LUA 101 (http://www.************/forums/ascent-guides/96215-scripting-lua-101-a.html)
Runikers LUA Guide (he cried) lol (http://www.************/forums/emulator-server-guides/131814-updated-mega-lua-guide-all-known-commands.html)

Now Lets begin with telling what setting a soul link will do

it makes OnCombat the monsters that are soullinked with it will come and attack as well
instead of single pulling you can get whole groups thus making instances more challenging
now lets begin

dementrating what it will do (in the form of letters)

instead of

z c
x


u

you will get




z x c
u

XD

Making and explaining the script

nothing much to explain if your trully fluent with LUA and you paid attension to the above
you will know how to use when to use why to use and (theres no 4th on hahahaha)

i generally use the OnSpawn function for this command



function Example_OnSpawn(pUnit, Event)
pUnit:SetSoulLinkedWith(z)
pUnit:SetSoulLinkedWith(c)
end

RegisterUnitEvent(x, 6, "Example_OnSpawn")

that will give you the example i made up earlier

now a true script will replace z, x, and c with
the Entry ID's

so have fun with this command : ) will be great for custom instances






Template

Written by Mager1794 created for editing purposes


function Template_OnSpawn(pUnit, Event)
pUnit:SetSoulLinkedWith(NPCID)
#Add more soul links if you wish
end

RegisterUnitEvent(NPCID, 6, "Template_OnSpawn")

thanks for reading guys i appreciate

shadowslayer133
16-07-09, 11:01 PM
/claps very nice thanks for explaining it

Alvanaar
28-08-09, 01:51 AM
Good work, mager. Lol.