wc3edit.net

United Warcraft 3 map hacking!
It is currently March 29th, 2024, 8:03 am

All times are UTC




Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Spell help..
PostPosted: June 19th, 2007, 11:33 am 
Offline
V.I.P.
User avatar

Joined: March 4th, 2007, 12:39 am
Posts: 332
Location: United States
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:
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:
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


Top
 Profile  
 
 Post subject: Re: Spell help..
PostPosted: June 19th, 2007, 11:40 am 
Offline
Honorary wc3edit.net Traitor
User avatar

Joined: February 1st, 2007, 4:11 pm
Posts: 2513
Location: NEVADA
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.


Top
 Profile  
 
 Post subject: Re: Spell help..
PostPosted: June 19th, 2007, 11:42 am 
Offline
V.I.P.
User avatar

Joined: March 4th, 2007, 12:39 am
Posts: 332
Location: United States
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


Top
 Profile  
 
 Post subject:
PostPosted: June 19th, 2007, 3:31 pm 
Offline
Forum Spammer
User avatar

Joined: May 29th, 2007, 9:02 am
Posts: 647
Location: London, England
Title: Strange old man
He's gone for good :)

_________________
Sir-Tanks is BACK and working on his new map Acts of War!
Take the best Stupidity test here


Top
 Profile  
 
 Post subject:
PostPosted: June 19th, 2007, 4:18 pm 
Offline
Forum Staff
User avatar

Joined: January 28th, 2007, 8:10 pm
Posts: 830
Location: Canada
Title: JASS Programmer
Facking noob
You missed the easiest part

Code:
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 -.-


Top
 Profile  
 
 Post subject:
PostPosted: June 19th, 2007, 7:27 pm 
Offline
Old Wrinkly Member
User avatar

Joined: May 20th, 2007, 5:03 am
Posts: 254
Location: Gages Lake(Da H00d), Illinois
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


Top
 Profile  
 
 Post subject:
PostPosted: June 19th, 2007, 7:42 pm 
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!


Top
  
 
 Post subject:
PostPosted: June 19th, 2007, 7:46 pm 
Offline
Old Wrinkly Member
User avatar

Joined: May 20th, 2007, 5:03 am
Posts: 254
Location: Gages Lake(Da H00d), Illinois
hey i know a lil...

_________________
I 4M BI11 G4735 F34R M3!!!!!!
I got H4xX0r3d by ID...oh noes
Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: June 19th, 2007, 7:47 pm 
Offline
Forum Spammer
User avatar

Joined: May 29th, 2007, 9:02 am
Posts: 647
Location: London, England
Title: Strange old man
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


Top
 Profile  
 
 Post subject:
PostPosted: June 19th, 2007, 7:48 pm 
Offline
Old Wrinkly Member
User avatar

Joined: May 20th, 2007, 5:03 am
Posts: 254
Location: Gages Lake(Da H00d), Illinois
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)