wc3edit.net

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

All times are UTC




Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Random Item Dropping?
PostPosted: August 17th, 2007, 6:57 am 
Offline
Junior Member

Joined: June 24th, 2007, 10:32 pm
Posts: 30
I'm not sure exactly what this is, but it has random stuff and Item Dropping. I ask for a breakdown of what Mp MR and Mn do (As specific as possible please).

Code:
function Mn takes unit MN,integer Mo returns item
    local item MO
    if(Mo==-1)then
        return null
    endif
    set MO=CreateItem(Mo,GetUnitX(MN)+GetRandomReal(-32,32),GetUnitY(MN)+GetRandomReal(-32,32))
    call SetItemDropID(MO,GetUnitTypeId(MN))
    call UpdateStockAvailability(MO)
    set LK=MO
    set MO=null
    return LK
endfunction

function Mp takes nothing returns nothing
    local widget MP=null
    local unit Mq=null
    local integer MQ=0
    local boolean Mr=true
    set MP=bj_lastDyingWidget
    if(MP==null)then
        set Mq=GetTriggerUnit()
    endif
    if(Mq!=null)then
        set Mr=not IsUnitHidden(Mq)
        if(Mr and GetChangingUnit()!=null)then
            set Mr=(GetChangingUnitPrevOwner()==Player(12))
        endif
    endif
    if(Mr)then
        call RandomDistReset()
        call RandomDistAddItem('I01W',10)
        call RandomDistAddItem(-1,90)
        set MQ=RandomDistChoose()
        if(Mq!=null)then
            call Mn(Mq,MQ)
        else
            call WidgetDropItem(MP,MQ)
        endif
    endif
    set bj_lastDyingWidget=null
    call DestroyTrigger(GetTriggeringTrigger())
endfunction

function MR takes nothing returns nothing
    local widget MP=null
    local unit Mq=null
    local integer MQ=0
    local boolean Mr=true
    set MP=bj_lastDyingWidget
    if(MP==null)then
        set Mq=GetTriggerUnit()
    endif
    if(Mq!=null)then
        set Mr=not IsUnitHidden(Mq)
        if(Mr and GetChangingUnit()!=null)then
            set Mr=(GetChangingUnitPrevOwner()==Player(12))
        endif
    endif
    if(Mr)then
        call RandomDistReset()
        call RandomDistAddItem('I047','d')
        set MQ=RandomDistChoose()
        if(Mq!=null)then
            call Mn(Mq,MQ)
        else
            call WidgetDropItem(MP,MQ)
        endif
    endif
    set bj_lastDyingWidget=null
    call DestroyTrigger(GetTriggeringTrigger())
endfunction


I tried to make the code as easy to view as I know how, hope it helps.


Top
 Profile  
 
PostPosted: August 17th, 2007, 7:09 am 
Offline
Old Wrinkly Member
User avatar

Joined: January 27th, 2007, 4:46 pm
Posts: 272
Location: Denver, Colorado
Title: OxyContin
You should join the chatroom, I am in it now. Would probably be easier than replying all the time in this thread.

_________________
You know why the Yankees always win, Frank?
'Cause they have Mickey Mantle?
No, it's 'cause the other teams can't stop staring at those damn pinstripes.


Top
 Profile  
 
PostPosted: August 18th, 2007, 10:40 pm 
Offline
Junior Member

Joined: June 24th, 2007, 10:32 pm
Posts: 30
Why would it be more beneficial to join that? The same question remains of "What does this code mean?" and I'm pretty sure that one long synopsis would be a better medium than many short, slightly dis-jointed synopses.


Top
 Profile  
 
PostPosted: August 20th, 2007, 8:51 pm 
Olreich wrote:
Why would it be more beneficial to join that? The same question remains of "What does this code mean?" and I'm pretty sure that one long synopsis would be a better medium than many short, slightly dis-jointed synopses.

Use your simple minded brain, you might know big words, but you sure as hell don't use them for the right reason. Think, "Why would I go to a chat room that instant messages instead of 1 per day messages..." Oh, I don't know, maybe it's faster, I never thought of that!
And yes, I do know what those "big words" mean, if you think I don't.
Now, I'm not trying to be mean, but if you know what all that means, you'd think you'd know why would you join a chat room where there's instant messages instead of 1 per day messages.


Top
  
 
PostPosted: August 20th, 2007, 10:23 pm 
Offline
Junior Member

Joined: June 24th, 2007, 10:32 pm
Posts: 30
Quote:
Use your simple minded brain, you might know big words, but you sure as hell don't use them for the right reason. Think, "Why would I go to a chat room that instant messages instead of 1 per day messages..." Oh, I don't know, maybe it's faster, I never thought of that!
And yes, I do know what those "big words" mean, if you think I don't.
Now, I'm not trying to be mean, but if you know what all that means, you'd think you'd know why would you join a chat room where there's instant messages instead of 1 per day messages.


You apparently don't know what the big words mean. Instant, no, maybe faster on response time, but slow on answer time. If someone would be kind enough to just run through the above an look at it, I'm pretty sure they can answer it cohesively in a single post.

Quote:
Why would it be more beneficial to join that? The same question remains of "What does this code mean?" and I'm pretty sure that one long synopsis would be a better medium than many short, slightly dis-jointed synopses.


The jist of what you seem to have skipped is in sentence 3, in which I state that in a situation such as this, when a long explanation is required, it is better to have all of it out and clarified in a single post, thus eliminating the problems of Chat, which include having chopped up language and not being as cohesive because you cannot quote.

In even simpler terms: 1 Long Post > Many Short Sentences

Funny Tidbit: I post a question. Instead of an answer, I get a philosophical argument between the merits of Chat Rooms and Forum Threads.


Top
 Profile  
 
PostPosted: August 21st, 2007, 3:58 am 
Offline
Forum Staff
User avatar

Joined: June 3rd, 2007, 8:03 pm
Posts: 1008
Olreich wrote:
Quote:
Use your simple minded brain, you might know big words, but you sure as hell don't use them for the right reason. Think, "Why would I go to a chat room that instant messages instead of 1 per day messages..." Oh, I don't know, maybe it's faster, I never thought of that!
And yes, I do know what those "big words" mean, if you think I don't.
Now, I'm not trying to be mean, but if you know what all that means, you'd think you'd know why would you join a chat room where there's instant messages instead of 1 per day messages.


You apparently don't know what the big words mean. Instant, no, maybe faster on response time, but slow on answer time. If someone would be kind enough to just run through the above an look at it, I'm pretty sure they can answer it cohesively in a single post.

Quote:
Why would it be more beneficial to join that? The same question remains of "What does this code mean?" and I'm pretty sure that one long synopsis would be a better medium than many short, slightly dis-jointed synopses.


The jist of what you seem to have skipped is in sentence 3, in which I state that in a situation such as this, when a long explanation is required, it is better to have all of it out and clarified in a single post, thus eliminating the problems of Chat, which include having chopped up language and not being as cohesive because you cannot quote.

In even simpler terms: 1 Long Post > Many Short Sentences

Funny Tidbit: I post a question. Instead of an answer, I get a philosophical argument between the merits of Chat Rooms and Forum Threads.



Actually beart was just aguing as to why you would want to join chat which you did ask. And as to that chat is better since a long post mite not answer everything your looking for and then you'd have to ask again, going back and fourth in a forum isn't as grand as going back and fourth in a chat room, bottom like you shoulda took ghetto up on his offer.

_________________
Get Your Map Making Pack Here! :wink:
Good flash games website! Come join me and have fun! :O
Image


Top
 Profile  
 
PostPosted: August 21st, 2007, 4:44 am 
Offline
Junior Member

Joined: June 24th, 2007, 10:32 pm
Posts: 30
That's peachy... w/e, I suppose I'll go try to figure it out for a longer period of time, though I don't think I'm getting anywhere...


Top
 Profile  
 
PostPosted: August 21st, 2007, 10:57 pm 
Offline
Old Wrinkly Member
User avatar

Joined: January 27th, 2007, 4:46 pm
Posts: 272
Location: Denver, Colorado
Title: OxyContin
Well, a widget can either be a unit, item or destructable. In this case it looks to be an item that we are dealing with by the looks of it. I'm not the best at JASS or anything but I will give it my best shot. Lets start with this line:

function Mn takes unit MN,integer Mo returns item

function Mn is obviously the optimized function name... whereas unit MN seems to be the triggering unit. Since the function says:

if(Mo==-1)then
return null

This means that if Mo is equal to negative one, then basically do nothing. You want it broken down in this ammount of detail how so?

_________________
You know why the Yankees always win, Frank?
'Cause they have Mickey Mantle?
No, it's 'cause the other teams can't stop staring at those damn pinstripes.


Top
 Profile  
 
PostPosted: August 22nd, 2007, 2:36 am 
Offline
Old Wrinkly Member
User avatar

Joined: June 20th, 2007, 8:53 pm
Posts: 233
Location: Canada
Title: Nevo
Olreich, you asked for these guys advice and they told you to go to the chat, then you start going off about you'd be better off asking it here. No offense but why the hell would you ask them in the first place?

_________________
My Favorite Rule:
- No excessive BBCode, (colors, flashing text, spoilers, etc.), using; don't use it for every single word you're typing, only use it make a word(s) stand out.


Top
 Profile  
 
PostPosted: August 22nd, 2007, 2:49 am 
Offline
Old Wrinkly Member
User avatar

Joined: January 27th, 2007, 4:46 pm
Posts: 272
Location: Denver, Colorado
Title: OxyContin
Its fine with me if that is what he/she wants, some people just prefer different things thats all. The only reason I brought it up was because Olreich was online when I posted my reply and I was in chat so I thought maybe it would be more convenient. Anyways Olreich refer to my post above nevo's.

_________________
You know why the Yankees always win, Frank?
'Cause they have Mickey Mantle?
No, it's 'cause the other teams can't stop staring at those damn pinstripes.


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 25 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)