Spell help..

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

namespoofer
V.I.P.
Posts: 332
Joined: March 4th, 2007, 12:39 am
Location: United States
Contact:

Spell help..

Post by namespoofer »

mmMmk. So I got Aero to give me some good ownage tips on making spellz in JASS and shit.. (4-5 hours straight lol)

I understand most of it, so I thought I would try something different.. save the unt instead of the location.. And I can't seem to get it to work, and Aero told me to Terrian and not worry about it, aka, figure it out urself on ur own time.. bastard.. -.-
Basically, when you cast meteor storm, it causes infernal births to randomly spawn around you and deal dmg. Aero at least told me what function to use to convert unit to integer to be stored in a game cache..

I cannot figure out why this doesn't work... I'm using these 2 custom functions:

Code: Select all

function H2I takes handle h returns integer
return h
return 0
endfunction

function ReturnUnit takes string title, string tag returns unit
return GetStoredInteger(udg_gc,title,tag)
return null
endfunction


And here is the trigger:

Code: Select all

function metcond takes nothing returns boolean
return GetSpellAbilityId()=='A05C'
endfunction

function mettimer takes nothing returns nothing
local timer t=GetExpiredTimer()
local string s=(I2S(H2I(t)))
local unit u=ReturnUnit(s,"u")
local location l=GetUnitLoc(u)
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local rect r=Rect(-640,384,256,448)
call RemoveLocation(l)
call MoveRectTo(r,x,y)
call DestroyEffect(AddSpecialEffectLocBJ(GetRandomLocInRect(r),"Units\\Demon\\Infernal\\InfernalBirth.mdl"))
call DestroyTimer(t)
call RemoveRect(r)
set l=null
set r=null
set t=null
set u=null
endfunction

function metact takes nothing returns nothing
local unit u=GetTriggerUnit()
local timer t=CreateTimer()
local string s=(I2S(H2I(t)))
local region r
call StoreInteger(udg_gc,s,"playerid",GetPlayerId(GetTriggerPlayer()))
call StoreInteger(udg_gc,s,"u",H2I(u))
call TimerStart(t,.05,true,function mettimer)
call PolledWait(2.50)
call DestroyTimer(t)
call FlushStoredMission(udg_gc,s)
set u=null
set s=""
set t=null   
endfunction

function InitTrig_meteorstorm takes nothing returns nothing
set gg_trg_meteorstorm = CreateTrigger()
call TriggerAddCondition(gg_trg_meteorstorm, Condition(function metcond))
call TriggerAddAction(gg_trg_meteorstorm, function metact)
endfunction


Rundown- unit casts spell, takes unit through 'ReturnUnit' function, stores it as integer, creates timer, starts timer, stores player id, GetStoredUnit gets the unit, gets the location of unit, converts location to xy, creates rect, moves rect to xy, and when timer goes off, creates infernal birth at random spot in rect.. then the clean-up..

K, so, Xantan, don't gimme the run-down on how easy it can be done.. I'm doing this the hard way to learn.. -.-

Spoofzz
Image
Doesn't Dekar make the world easier?

"I Wumbo. YOU Wumbo. He she me.. WUMbo. Wumbo; WumboING; WumBOLogy; the study of WUMBO. It's first grade, Spongebob!"
"I'm sorry I doubted your great wisdom Patrick!"

Catch me on Azeroth (U.S. East) - NameSpoofer
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2513
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Re: Spell help..

Post by Xantan »

namespoofer wrote:
K, so, Xantan, don't gimme the run-down on how easy it can be done.. I'm doing this the hard way to learn.. -.-

Spoofzz

Do it yourself then, if you'd like to learn ^^


I'm going to bed, may or may not look at this tomorrow.
peace.
namespoofer
V.I.P.
Posts: 332
Joined: March 4th, 2007, 12:39 am
Location: United States
Contact:

Re: Spell help..

Post by namespoofer »

Xantan wrote:
namespoofer wrote:
K, so, Xantan, don't gimme the run-down on how easy it can be done.. I'm doing this the hard way to learn.. -.-

Spoofzz

Do it yourself then, if you'd like to learn ^^


I'm going to bed, may or may not look at this tomorrow.
peace.


But usually you give me the easiest way to do it -.- I have given up on this and want to know what I did wrong =\

I didn't mean don't help me Xantan!!!!! =(
Image
Doesn't Dekar make the world easier?

"I Wumbo. YOU Wumbo. He she me.. WUMbo. Wumbo; WumboING; WumBOLogy; the study of WUMBO. It's first grade, Spongebob!"
"I'm sorry I doubted your great wisdom Patrick!"

Catch me on Azeroth (U.S. East) - NameSpoofer
Sir-Tanks
Forum Spammer
Posts: 647
Joined: May 29th, 2007, 9:02 am
Title: Strange old man
Location: London, England

Post by Sir-Tanks »

He's gone for good :)
Sir-Tanks is BACK and working on his new map Acts of War!
Take the best Stupidity test here
User avatar
Aero
Forum Staff
Posts: 830
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Post by Aero »

Facking noob
You missed the easiest part

Code: Select all

function InitTrig_meteorstorm takes nothing returns nothing 
set gg_trg_meteorstorm = CreateTrigger()
call TriggerAddCondition(gg_trg_meteorstorm, Condition(function metcond))
call TriggerAddAction(gg_trg_meteorstorm, function metact)
endfunction


call TriggerRegisterAnyUnitEventBJ ? .... Nab -.-
User avatar
Bill Gates
Old Wrinkly Member
Posts: 254
Joined: May 20th, 2007, 5:03 am
Location: Gages Lake(Da H00d), Illinois

Post by Bill Gates »

haha yes namespoofer you are a facking nab even i knew that :X and im a bigger noob
I 4M BI11 G4735 F34R M3!!!!!!
I got H4xX0r3d by ID...oh noes
Image
Image
Bartimaeus²

Post by Bartimaeus² »

13ill_Gates wrote:haha yes namespoofer you are a facking nab even i knew that :X and im a bigger noob


Okay.. I don't think you know JASS at all!
User avatar
Bill Gates
Old Wrinkly Member
Posts: 254
Joined: May 20th, 2007, 5:03 am
Location: Gages Lake(Da H00d), Illinois

Post by Bill Gates »

hey i know a lil...
I 4M BI11 G4735 F34R M3!!!!!!
I got H4xX0r3d by ID...oh noes
Image
Image
Sir-Tanks
Forum Spammer
Posts: 647
Joined: May 29th, 2007, 9:02 am
Title: Strange old man
Location: London, England

Post by Sir-Tanks »

Sure... i bet you dont :wink:
Sir-Tanks is BACK and working on his new map Acts of War!
Take the best Stupidity test here
User avatar
Bill Gates
Old Wrinkly Member
Posts: 254
Joined: May 20th, 2007, 5:03 am
Location: Gages Lake(Da H00d), Illinois

Post by Bill Gates »

oh wait did namespoofer edit his post cause he has what aero has
I 4M BI11 G4735 F34R M3!!!!!!
I got H4xX0r3d by ID...oh noes
Image
Image
Post Reply