wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Samples
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 05-12-2009, 04:44 AM   #46
DanThanh
User
 
DanThanh's Avatar
 
Join Date: Apr 2009
Posts: 137

Submissions (1)

DanThanh has little to show at this moment (7)

Send a message via Yahoo to DanThanh
Default

Are you going to update this to fix the CSSafeCache?
but now we are using XE instead of CS System !
__________________
DanThanh is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 05-12-2009, 10:40 AM   #47
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Quote:
Are you going to update this to fix the CSSafeCache?
what?

This might get updated but it will probably use auto index.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 05-12-2009, 12:07 PM   #48
DanThanh
User
 
DanThanh's Avatar
 
Join Date: Apr 2009
Posts: 137

Submissions (1)

DanThanh has little to show at this moment (7)

Send a message via Yahoo to DanThanh
Default

This is good news, then we are looking forward to use new version !
__________________
DanThanh is offline   Reply With Quote
Old 06-24-2009, 12:15 AM   #49
Sinnergy
User
 
Sinnergy's Avatar
 
Join Date: Apr 2009
Posts: 173

Sinnergy has little to show at this moment (8)

Send a message via Yahoo to Sinnergy
Default

new version!!!! really need it
__________________
Current Project:
Rise of Sinnergy v1.00
Sinnergy is offline   Reply With Quote
Old 06-24-2009, 08:47 AM   #50
Flame_Phoenix
retired coder | real ilfe
 
Flame_Phoenix's Avatar
 
Join Date: Mar 2007
Posts: 2,208

Submissions (10)

Flame_Phoenix has a spectacular aura about (90)Flame_Phoenix has a spectacular aura about (90)Flame_Phoenix has a spectacular aura about (90)Flame_Phoenix has a spectacular aura about (90)

Send a message via MSN to Flame_Phoenix
Default

Quote:
new version!!!! really need it
Amen.
__________________
Check out my tutorials at:
1-Creating a Hero Tavern
2-Complete Icon Tutorial - ALL about Icons
3-Making a spell in vJass - Practice Session 1
Check out all my current spells at here
Finally, check my project:
Castle vs Castle Flame Edition
Flame_Phoenix is offline   Reply With Quote
Old 12-20-2009, 01:59 PM   #51
Darah
User
 
Join Date: Dec 2009
Posts: 1

Darah has little to show at this moment (0)

Default

Vex, could you please update this? It's an awesome system!
Darah is offline   Reply With Quote
Old 12-28-2009, 02:25 PM   #52
rain.mon
User
 
rain.mon's Avatar
 
Join Date: Dec 2008
Posts: 143

rain.mon will become famous soon enough (33)rain.mon will become famous soon enough (33)

Default

Posting for an update if possible.
__________________
rain.mon is offline   Reply With Quote
Old 12-29-2009, 01:16 PM   #53
Evincar
User
 
Join Date: Sep 2006
Posts: 12

Evincar has little to show at this moment (0)

Default

Quote:
Originally Posted by rain.mon
Posting for an update if possible.
Evincar is offline   Reply With Quote
Old 01-01-2010, 01:57 AM   #54
sLsIDK
User
 
Join Date: Dec 2008
Posts: 1

sLsIDK has little to show at this moment (0)

Default

Quote:
Originally Posted by Evincar
Quote:
Originally Posted by rain.mon
Posting for an update if possible.
sLsIDK is offline   Reply With Quote
Old 01-01-2010, 04:26 PM   #55
MoCo
User
 
MoCo's Avatar
 
Join Date: Feb 2006
Posts: 84

MoCo is on a distinguished road (14)

Send a message via ICQ to MoCo
Default

+1

I'd also appreciate a new version. :)
__________________
MoCo is offline   Reply With Quote
Old 01-01-2010, 09:35 PM   #56
blanc_dummy
User
 
blanc_dummy's Avatar
 
Join Date: Jun 2007
Posts: 106

Submissions (1)

blanc_dummy has little to show at this moment (7)

Send a message via Yahoo to blanc_dummy
Default

or make your own system :p
__________________
blanc_dummy is offline   Reply With Quote
Old 01-01-2010, 10:20 PM   #57
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Sure, I finished something the other day that will finally allow me to revive most of the things (was not ever decided as to what to do regarding unit attachment). I was just busy. this will be the next thing I revive, I promise. though that may not be extremely soon, I promise it will happen this year though.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 01-11-2010, 02:32 AM   #58
muse1988
User
 
Join Date: Feb 2009
Posts: 8

muse1988 has little to show at this moment (0)

Default

Quote:
Originally Posted by Vexorian
Sure, I finished something the other day that will finally allow me to revive most of the things (was not ever decided as to what to do regarding unit attachment). I was just busy. this will be the next thing I revive, I promise. though that may not be extremely soon, I promise it will happen this year though.

YAY this was by far my fav submission of yours Vex
muse1988 is offline   Reply With Quote
Old 01-17-2010, 08:56 PM   #59
MoCo
User
 
MoCo's Avatar
 
Join Date: Feb 2006
Posts: 84

MoCo is on a distinguished road (14)

Send a message via ICQ to MoCo
Default

Since I needed this system for my current projects, I've modified it to work with the latest patches and set it up as a library. Requirements have changed, usage stays the same,.

I'll post the code here so that everyone who wants to use it may do so.

Code

Collapse JASS:
library IndieSummons initializer Init requires AutoIndex, TimerUtils, Table
//**************************************************************************************************
//* 
//* Independant Summons (Code + config)
//* ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
//* You just need to copy this trigger, notice that these functions do nothing without the other
//* part which has the header functions and you'll also need to call them.
//*
//**************************************************************************************************

// 2010-01-18 (Original system by Vexorian, modified by MoCo):
//   - vjassification of system
//   - now works with latest patches

//==================================================================================================
// Independant Summons Configuration:
//
globals
    private Table SummonIdTab
    private unit array Summons[1]
    private unit array Masters[1]
    private integer N = 0
    private constant integer MAX_N = 64 
endglobals

private constant function IndieSummon_maxdelay takes nothing returns real
    return 2.5 //* The max delay betwen orders issued to the summon
endfunction

private constant function IndieSummon_mindelay takes nothing returns real
    return 1.00 //* The min delay betwen orders issued to the summon
endfunction

private constant function IndieSummon_maxdistance takes nothing returns real
    return 800.0 //* If the distance betwen the summon and the master is greater than this value,
                  //  The summon will move to the position of the master instead of attack move
endfunction

private constant function IndieSummon_cometomaxdist takes nothing returns real
    return 500.0 //* Max distance for issued orders to approach the master
endfunction

private constant function IndieSummon_cometomindist takes nothing returns real
    return 100.0 //* Min distance for issued orders to approach the master
endfunction

//==================================================================================================
private function SetSummonId takes unit summon returns integer
    set N = N + 1
    set SummonIdTab[GetUnitId(summon)] = N
    if N > MAX_N then
        set N = 0
    endif
    return SummonIdTab[GetUnitId(summon)]
endfunction

private function GetSummonId takes unit summon returns integer
    return SummonIdTab[GetUnitId(summon)]
endfunction

private function IndieSummon_GetMaster takes unit summon returns unit
    local integer id = GetSummonId(summon)
    return Masters[id] 
    return null
endfunction

private function IndieSummon_StopAI takes unit summon returns nothing
    local integer id = GetSummonId(summon)
    set Masters[id] = null 
endfunction

private function IndieSummon_Order takes unit summon, unit master returns nothing
    local integer o=GetUnitCurrentOrder(summon)
    local real tx=GetUnitX(master)
    local real ty=GetUnitY(master)
    local real angle
    local real dist

    set dist=Pow(tx-GetUnitX(summon),2) + Pow(ty-GetUnitY(summon),2)
    if (dist > (IndieSummon_maxdistance()*IndieSummon_maxdistance()) )  and (o == 0 or o == OrderId("attack") or o == OrderId("move") or o == OrderId("stop") or o==851971) then
        call IssuePointOrder(summon, "move", tx,ty) 
    elseif dist >= (IndieSummon_cometomindist()*IndieSummon_cometomindist()) and (o == 0 or o == 851971) then
        set angle = GetRandomReal( GetUnitFacing(master)-80, GetUnitFacing(master)+80)
        if (ModuloInteger(GetUnitPointValue(summon),2)==0) then
            set angle=angle * bj_DEGTORAD
        else
            set angle=- angle * bj_DEGTORAD
        endif

        set dist = GetRandomReal(IndieSummon_cometomindist(), IndieSummon_cometomaxdist() )
        set tx=tx+dist*Cos(angle)
        set ty=ty+dist*Sin(angle)
        if not IssuePointOrder(summon, "attack", tx, ty ) then
            call IssuePointOrder(summon, "move", tx, ty )
        endif
    endif
    set summon=null
    set master=null
endfunction

private function IndieSummon_AntiSmart_Timer takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local integer id = GetTimerData(t)
    local unit s = Summons[id]       
    local unit m = Masters[id]
    
    if (GetUnitCurrentOrder(s)!=851971) then
        call DestroyTimer(t)
    else
        call IndieSummon_Order( s, m )
        call TimerStart(t,0.1,false,function IndieSummon_AntiSmart_Timer)
    endif
    set t = null
    set s = null
    set m = null
endfunction


private function IndieSummon_AntiSmart takes nothing returns nothing
    local timer t
    local integer id = GetSummonId(GetTriggerUnit())

    if (GetIssuedOrderId() == 851971) then
        set t=CreateTimer()
        call SetTimerData(t, id)
        call TimerStart(t,0,false,function IndieSummon_AntiSmart_Timer)
        set t=null
    endif
endfunction

private function IndieSummon_loop takes integer id returns nothing
    local unit summon = Summons[id]  
    local unit master // = Masters[id]
    local trigger smart=CreateTrigger()
    local integer n = 0
    local triggeraction ac = TriggerAddAction( smart, function IndieSummon_AntiSmart)
    
    call TriggerRegisterUnitEvent( smart, summon, EVENT_UNIT_ISSUED_TARGET_ORDER )
    call TriggerRegisterUnitEvent( smart, summon, EVENT_UNIT_ISSUED_POINT_ORDER )
    loop
        exitwhen (GetWidgetLife(summon)<=0)
        set master = Masters[id]
        if (master==null) then
            exitwhen true
        else
            call IndieSummon_Order( summon, master)
            call PolledWait( GetRandomReal( IndieSummon_mindelay(), IndieSummon_maxdelay() ))
        endif
    endloop
    
    set Masters[id] = null

    call TriggerRemoveAction(smart,ac)
    if smart != null then
        call DestroyTrigger(smart)
    endif

    set ac=null
    set summon=null
    set master=null
    set smart=null
endfunction

function IndieSummon_SetMaster takes unit summon, unit master returns nothing
    local integer id

    set id = SetSummonId(summon)

    set Masters[id] = master 
    set Summons[id] = summon
    
    call IndieSummon_loop.execute(id)
endfunction

//===========================================================================
private function Init takes nothing returns nothing
    set SummonIdTab = Table.create()
endfunction

endlibrary

__________________

Last edited by MoCo : 07-20-2011 at 12:41 PM.
MoCo is offline   Reply With Quote
Old 02-09-2010, 04:00 AM   #60
CHA_Owner(NAMM)
User
 
Join Date: May 2009
Posts: 5

CHA_Owner(NAMM) has little to show at this moment (0)

Default

yep keep it up vexorian would love to see an update
CHA_Owner(NAMM) is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 06:13 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services