Will your scripts work with Linux too? Do you have or know where I can get the scripts, to script Black Temple on a Linux server?
Will your scripts work with Linux too? Do you have or know where I can get the scripts, to script Black Temple on a Linux server?
LUA works on Ascent, regardless of OS.
For BT i'd recommend a C++ script, try Moon++
What he said...
I am just wondering what does math.randomseed( os.time() )Code:function Priest_OnCombat(pUnit, Event) pUnit:RegisterEvent("Priest_Choose", 3000, 0) end function Priest_Choose(pUnit, Event) math.randomseed( os.time() ) local choice = math.random(4) if choice == 1 then pUnit:FullCastSpellOnTarget(20695, pUnit:GetMainTank()) elseif choice == 2 then pUnit:FullCastSpellOnTarget(23860, pUnit:GetMainTank()) elseif choice >= 3 then if pUnit:GetRandomFriend() == nil then pUnit:FullCastSpell(17843) else pUnit:FullCastSpellOnTarget(17843, pUnit:GetRandomFriend()) end end end function Priest_OnLeaveCombat(pUnit, Event) pUnit:RemoveEvents() end function Priest_OnDied(pUnit, Event) pUnit:RemoveEvents() end
local choice = math.random(4) do in the script. I know it has to do somee thing with the picking but what does it do exactly and how do you set it up?
DA Gift From Mr. Blain
local choice <- declares a local variable called choice
math.random(4) <- generates a random number 1-4
math.randomseed( os.time() ) <- generates a new seed based on the current time. Read this for more info about random seeds: Random seed - Wikipedia, the free encyclopedia
O Okay Thank You
DA Gift From Mr. Blain
Sure thing![]()
Hiho^^
I need a script for some kinda Brewfest on my server^^ So:
If a player (or NPC (optionally)) uses an item with ID 2595 (Bourbon) 4 times, he cast's Spell 24839 on himself^^Could you write a script for me or maybe just tell me how to write this one?
St_Anger
Not possible with current implementation of LUA
hm ok-.-
But thank you anyway^^
errish. i made a lesser script here.. just for the npc, the player cant be done with lua (i thinkz) he casts spell 11009 (the effect from bourbon) 4 times, then uses 24839 on himself.. while in the emotestate of drinking
function aholic_onSpawn (pUnit, Event)
pUnit:RemoveEvents();
pUnit:Emote (EmoteID)
pUnit:FullCastSpell(11009)
pUnit:FullCastSpell(11009)
pUnit:FullCastSpell(11009)
pUnit:FullCastSpell(11009)
pUnit:FullCastSpell(24839)
end
RegisterUnitEvent (npcid, 6, "aholic_onSpawn")
RegisterUnitEvent (npcid, 10, "aholic_onSpawn")
RegisterUnitEvent (npcid, 10, "aholic_onSpawn")
It makes him drink bourbon 4 times when he spawns.. and again 4 times everytime a player enters range. i dont remember emoteid for drink:b (dont think its neccesary anyways) and ofc cast 24839 on himself after he drank it 4 times. just quickly messed this together so if theres any errors tell me:P tho u probs wont use it^^
Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>
Wow^^ thx dude^^
nps:P trying to help the community as ive recieved alot of help here, also trying to reach contributer:b
Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>
Thanks i'll rep soon.pUnit:SpawnCreature(70015, x, y, z, orientation, faction, duration); duration is in miliseconds btw
np;D fffffffilllllz000rr oh no! now i wrote 2 much;<
Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>