| 05-10-2011, 05:29 AM | #1 |
Worldedit for 1.24e or newest Script for use in map: WEInfinity.j (0.02) This version: Beta 2 In this version it don't have all function in WEInfinity.j sorry i will make it in new version Changelog: Beta 2: Remove more worldedit limit see UnitMetalData.slk: WEInfinity.j (0.03) changelog: fix bug: Function KillUnitInRect return bug (in 0.02 it will kill only 1 unit) |
| 05-10-2011, 11:15 AM | #2 |
Please include an explaination of what it does. How does it compare to Jass NewGen Pack? How does it compare to World Editor? Do maps running these kind of edits function properly on battle.net? |
| 05-10-2011, 11:35 AM | #3 |
The jassnewgenpack can't open some trigger data that make by game patch: 1.24e (by normal worldedit) but mpqdraft can't hack jassnewgenpack sorry. |
| 05-10-2011, 02:55 PM | #4 |
While Jass NewGen Pack does not function properly with current GUI and also has some quite obscure bugs, I don't fault its other good features like being a great framework for writing vJass and it's therefore still a viable alternative. I still have absolutely no idea what you've written as I have difficulties opening a .zip file with a two-line description. |
| 05-10-2011, 03:51 PM | #5 |
Took a short look in the WEInfinity.j file. There are some things you could improve. Let's take a look @ GetRandomPlayer. (Beside the fact that i will always be Player(0)) JASS:function GetRandomPlayer takes nothing returns player local integer MaxI = 0 local integer i = GetRandomInt (0,MaxI) local player p1 = Player (0) local player p2 = Player (1) local player p3 = Player (2) local player p4 = Player (3) local player p5 = Player (4) local player p6 = Player (5) local player p7 = Player (6) local player p8 = Player (7) local player p9 = Player (8) local player p10 = Player (9) local player p11 = Player (10) local player p12 = Player (11) //setup it if ( not ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 0 elseif ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 1 elseif ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 2 elseif ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 3 elseif ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 4 elseif ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 5 elseif ( not ( GetPlayerSlotState(Player(6)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 6 elseif ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 7 elseif ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 8 elseif ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 9 elseif ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 10 elseif ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 11 endif //get player if (i == 0 ) then return p1 elseif (i == 1) then return p2 elseif (i == 2) then return p3 elseif (i == 3) then return p4 elseif (i == 4) then return p5 elseif (i == 5) then return p6 elseif (i == 6) then return p7 elseif (i == 7) then return p8 elseif (i == 8) then return p9 elseif (i == 9) then return p10 elseif (i == 10) then return p11 elseif (i == 11) then return p12 endif return null endfunction JASS:function GetRandomPlayer takes nothing returns player local integer i = GetRandomInt (0,11) local integer tmp_i = i local integer abort_counter = 11 //Just to provide a 100% abort condition, not really required though loop exitwhen(GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING) exitwhen abort_counter <= 0 loop set i = GetRandomInt(0,11) exitwhen(tmp_i != i) endloop set tmp_i = i set abort_counter = abort_counter - 1 endloop if(abort_counter<0)then return null endif return Player(i) endfunction ---Edit--- Anitarf's function is better than mine, no idea what i did smoke yesterday... |
| 05-10-2011, 04:39 PM | #6 |
Okay, just so this GetRandomPlayer nonsense does not remain unaddressed, the examples given above are not very sensible. JASS:function GetRandomPlayer takes nothing returns player local integer i = 0 local integer j = 0 local integer array p loop exitwhen i>11 if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING then set p[j]=i set j=j+1 endif set i=i+1 endloop if j==0 then // Is this even possible? return null endif return Player(p[GetRandomInt(0,j-1)]) endfunction This is of course a bit off topic, but it is the only thing posted so far that I could really give a response to, as the first post still lacks any kind of description of what this is all about. |
| 05-11-2011, 10:05 AM | #7 |
Quoting the WEInfinite.j file because it has to be done for lack of a description: JASS://WEInfinity made by chomtana //Version: 0.1 ////////////////////////////////////////////// //don't copy this line globals // Chomtana variable unit udg_chvar_LastEnterUnit = null unit udg_chvar_LastLeaveUnit = null unit udg_chvar_LastCreateUnit = null unit udg_chvar_LastDieUnit = null unit udg_chvar_TriggerUnit = null // TD variable rect udg_chtd_StartPoint = null rect array udg_chtd_Way rect udg_chtd_EndPoint = null //Cheat API trigger udg_chcheat_MoneyRegen = null integer udg_chcheat_MoneyRegenI = 0 player udg_chcheat_MoneyRegenP = null playerstate udg_chcheat_MoneyRegenPS = null real udg_chcheat_MoneyRegenKT = 0.00 endglobals //don't copy this line //Copy next line to map custom script function RemoveResource takes integer delta, player whichPlayer, playerstate whichPlayerState returns nothing call AdjustPlayerStateSimpleBJ(whichPlayer, whichPlayerState, 0-delta) //Example for call RemoveMoney //call RemoveMoney ( 120, Player (0), PLAYER_STATE_RESOURCE_GOLD ) //this will remove your 120 gold endfunction function AdvanceAddHeroStat takes unit whichHero,integer whichStat,integer MoreStat returns nothing if ( whichStat == bj_HEROSTAT_STR ) then call SetHeroStr(whichHero, GetHeroStr(whichHero, true)+MoreStat, true ) elseif ( whichStat == bj_HEROSTAT_AGI ) then call SetHeroAgi(whichHero, GetHeroAgi(whichHero, true)+MoreStat, true ) elseif ( whichStat == bj_HEROSTAT_INT ) then call SetHeroInt(whichHero, GetHeroInt(whichHero, true)+MoreStat, true ) else endif endfunction function RemoveUnitHP takes unit whichUnit,integer hpYouWantRemove returns nothing call SetUnitLifeBJ( whichUnit, GetUnitStateSwap(UNIT_STATE_LIFE, whichUnit) - hpYouWantRemove ) endfunction function RemoveUnitMana takes unit whichUnit,integer ManaYouWantRemove returns nothing call SetUnitManaBJ( whichUnit, GetUnitStateSwap(UNIT_STATE_LIFE, whichUnit) - ManaYouWantRemove ) endfunction function AddUnitHP takes unit whichUnit,integer hpYouWantAdd returns nothing call SetUnitLifeBJ( whichUnit, GetUnitStateSwap(UNIT_STATE_LIFE, whichUnit) + hpYouWantAdd ) endfunction function AddUnitMana takes unit whichUnit,integer ManaYouWantAdd returns nothing call SetUnitManaBJ( whichUnit, GetUnitStateSwap(UNIT_STATE_LIFE, whichUnit) + ManaYouWantAdd ) endfunction function KillUnitInRect takes rect whichrect returns nothing call KillUnit ( GroupPickRandomUnit( GetUnitsInRectAll ( whichrect ) ) ) endfunction function SendMassageWithColor takes string color,string massage,force traget returns nothing if ( color == "no color" ) then call DisplayTextToForce ( traget, massage ) else call DisplayTextToForce ( traget, "|c"+color+massage+"|r" ) endif endfunction function SetChvar_LastCreateUnit takes nothing returns nothing set udg_chvar_LastCreateUnit = GetLastCreatedUnit () endfunction function SetChvar_LastDieUnit takes nothing returns nothing set udg_chvar_LastDieUnit = GetDyingUnit () endfunction function SetChvar_LastEnterUnit takes nothing returns nothing set udg_chvar_LastEnterUnit = GetEnteringUnit () endfunction function SetChvar_LastLeaveUnit takes nothing returns nothing set udg_chvar_LastLeaveUnit = GetLeavingUnit () endfunction function SetChvar_TriggerUnit takes nothing returns nothing set udg_chvar_TriggerUnit = GetTriggerUnit () endfunction function TD_SetStartPoint takes rect whichrect returns nothing set udg_chtd_StartPoint = whichrect endfunction function TD_SetWay takes integer whichindex,rect whichrect returns nothing set udg_chtd_Way [whichindex] = whichrect endfunction function TD_SetEndPoint takes rect whichrect returns nothing set udg_chtd_EndPoint = whichrect endfunction //Cheat API function UnlimitMoney takes player whichplayer,playerstate whichplayerstate returns nothing call SetPlayerState ( whichplayer, whichplayerstate, 1000000 ) endfunction function RegenMoneyTrigger takes nothing returns nothing call AdjustPlayerStateBJ ( udg_chcheat_MoneyRegenI, udg_chcheat_MoneyRegenP, udg_chcheat_MoneyRegenPS ) call TriggerSleepAction ( udg_chcheat_MoneyRegenKT ) call TriggerExecute ( udg_chcheat_MoneyRegen ) endfunction function RegenMoneyIni takes nothing returns nothing set udg_chcheat_MoneyRegen = CreateTrigger () call DisableTrigger ( udg_chcheat_MoneyRegen ) call TriggerAddAction ( udg_chcheat_MoneyRegen, function RegenMoneyTrigger ) endfunction function RegenMoney takes integer moneypersec,playerstate whichplayerstate,real kwamti,player whichplayer returns nothing call EnableTrigger ( udg_chcheat_MoneyRegen ) set udg_chcheat_MoneyRegenI = moneypersec set udg_chcheat_MoneyRegenP = whichplayer set udg_chcheat_MoneyRegenPS = whichplayerstate set udg_chcheat_MoneyRegenKT = kwamti call TriggerExecute ( udg_chcheat_MoneyRegen ) endfunction //end cheat API function ColorText takes string color,string massage returns string if ( color == "no color" ) then return massage else return "|c"+color+massage+"|r" endif endfunction function MakeNormalString takes string a returns string return a endfunction function GetColorCode takes string a returns string if ( a == "no color" ) then return null else return a endif endfunction function GetRandomPlayer takes nothing returns player local integer MaxI = 0 local integer i = GetRandomInt (0,MaxI) local player p1 = Player (0) local player p2 = Player (1) local player p3 = Player (2) local player p4 = Player (3) local player p5 = Player (4) local player p6 = Player (5) local player p7 = Player (6) local player p8 = Player (7) local player p9 = Player (8) local player p10 = Player (9) local player p11 = Player (10) local player p12 = Player (11) //setup it if ( not ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 0 elseif ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 1 elseif ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 2 elseif ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 3 elseif ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 4 elseif ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 5 elseif ( not ( GetPlayerSlotState(Player(6)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 6 elseif ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 7 elseif ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 8 elseif ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 9 elseif ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 10 elseif ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 11 endif //get player if (i == 0 ) then return p1 elseif (i == 1) then return p2 elseif (i == 2) then return p3 elseif (i == 3) then return p4 elseif (i == 4) then return p5 elseif (i == 5) then return p6 elseif (i == 6) then return p7 elseif (i == 7) then return p8 elseif (i == 8) then return p9 elseif (i == 9) then return p10 elseif (i == 10) then return p11 elseif (i == 11) then return p12 endif return null endfunction function GetRandomPlayerInPG takes nothing returns force local integer MaxI = 0 local integer i = GetRandomInt (0,MaxI) local force p1 = bj_FORCE_PLAYER[0] local force p2 = bj_FORCE_PLAYER[1] local force p3 = bj_FORCE_PLAYER[2] local force p4 = bj_FORCE_PLAYER[3] local force p5 = bj_FORCE_PLAYER[4] local force p6 = bj_FORCE_PLAYER[5] local force p7 = bj_FORCE_PLAYER[6] local force p8 = bj_FORCE_PLAYER[7] local force p9 = bj_FORCE_PLAYER[8] local force p10 = bj_FORCE_PLAYER[9] local force p11 = bj_FORCE_PLAYER[10] local force p12 = bj_FORCE_PLAYER[11] //setup it if ( not ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 0 elseif ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 1 elseif ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 2 elseif ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 3 elseif ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 4 elseif ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 5 elseif ( not ( GetPlayerSlotState(Player(6)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 6 elseif ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 7 elseif ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 8 elseif ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 9 elseif ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 10 elseif ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then set MaxI = 11 endif //get player if (i == 0 ) then return p1 elseif (i == 1) then return p2 elseif (i == 2) then return p3 elseif (i == 3) then return p4 elseif (i == 4) then return p5 elseif (i == 5) then return p6 elseif (i == 6) then return p7 elseif (i == 7) then return p8 elseif (i == 8) then return p9 elseif (i == 9) then return p10 elseif (i == 10) then return p11 elseif (i == 11) then return p12 endif return null endfunction Based on what I can see here, lack of efficiency, lack of real understanding of what functions you're working with, spelling errors, and it being an extremely short list of things you've changed... I can't see a reason why anyone would use this. |
| 05-13-2011, 02:56 AM | #8 |
function GetRandomPlayer i test it with version 1.24e and 1.26a (newest version) only. i don't have to test it with version 1.21b |
| 05-13-2011, 02:58 AM | #9 | |
Quote:
This will test it |
| 05-13-2011, 03:04 AM | #10 | ||
Quote:
this not work Quote:
this work |
| 05-14-2011, 08:35 AM | #11 |
I'm still wondering what this is... is this supposed to be like WE Unlimited? |
| 05-15-2011, 11:11 AM | #12 | |
Quote:
it have to remove more worldedit limit than WE Unlimit you can see in unit cost list you can enter cost: min: -99999999 max: 99999999 |
| 05-15-2011, 09:15 PM | #13 |
So in other words, this is like a new WE Unlimited. Is there an easy way to port systems to GUI using this, because that could be useful. |
| 05-15-2011, 11:43 PM | #14 | |
Quote:
do you can declear all syntax in WEUnlimit I see some function can't be declear (Advance trigger) |
