- Joined
- Nov 11, 2006
- Messages
- 7,572
Take my rep. That is awesome.
local string resp = null
local Http req = Http.create()
set req.url = "hiveworkshop.com"
set req.reqMethod = "GET"
call req.BeginRequest()
loop
exitwhen resp != null
set resp = HttpPendingResponse(req)
call TriggerSleepAction(0)
endloop
call req.destroy()
call ClearTextMessages()
call BJDebugMsg(resp)
struct Http
string reqMethod = ""
string url = ""
string cookies = ""
string values = ""
method BeginRequest takes nothing returns nothing
call StartRequest(this.reqMethod, this.url, this.cookies, this.values, this)
endmethod
static method Post takes string url, string cookies, string values returns string
return HttpRequest("POST", url, cookies, values)
endmethod
static method Get takes string url, string cookies returns string
return HttpRequest("GET", url, cookies, "")
endmethod
endstruct
native FramesPerSecond takes nothing returns real
native EnableChatMessages takes boolean flag returns nothing
native InterfaceMessage takes string message, integer area, real duration returns nothing
native PlayerChatMessage takes integer pid, string message, integer whichGroup, real duration returns nothing
But it don't work.SetUnitState(u, UNIT_STATE_MAX_LIFE, x) already exists
I dont know if its possible.. But build in unit indexer please.
Create natives that will effect object data (units, abilities, items, upgrades...):
- SetUnitName(int id, string s)
- SetUnitTooltip(int id, string s)
- SetAbilityTooltip(int id, int for_lvl, string s)
- SetAbilityTooltipExtended(int id, int for_lvl, string s)
...
or some for unit states
- SetUnitState(unit u, int state, int value)
where state can be: max hp,damage,damage type,armor,regeneration rate,...
wait this is freakn cool
but how do u use it? where do i ahve to extract it to and etc? what files do i run
But it don't work.
Why you even post something you didn't tested, why you think people work on such complex bonus systems and shits... Whatever...Are you serious ?
I never tested this because I didn't need so but if it doesn't work so I agree with you that he can be cool to have such natives.
Why you even post something you didn't tested, why you think people work on such complex bonus systems and shits... Whatever...
I'm all into this if you allow us to edit object data using functions.
Oh boy, item generators for RPG maps are something we REALLY NEED.
Exactly what I do in my SotP project, still as you said item model, tooltip, icon look all the same.Well apart from generating actual item objects, you can have item generators. You would just need to trigger all the effects. The downside would you would have a limited number of item names/models.
I've helped TriggerHappy with installing a DirectX EndScene hook, means overlaying a custom UI is relatively simple. The biggest hurdle is wrapping all the DirectX8 stuff in Warcraft III with C#.Can you create natives that allow us to build custom UI based on U and V real coordinates on screen?
Like DGUI, just directly supported by the scripting language with no traffic and lag due to moving objects around in Multiplayer. As it's just a visual thing, it doesn't need to be syncronized except for click/keypress events on those UI elements (those have to be synced, naturally).
If you could do that (and the multiplayer support for SharpCraft is completed and bug free), I will port Gaias Retaliation ORPG over to using SharpCraft and require all people that want to play it to install SharpCraft.
Can you create natives that allow us to build custom UI based on U and V real coordinates on screen?
Like DGUI, just directly supported by the scripting language with no traffic and lag due to moving objects around in Multiplayer. As it's just a visual thing, it doesn't need to be syncronized except for click/keypress events on those UI elements (those have to be synced, naturally).
If you could do that (and the multiplayer support for SharpCraft is completed and bug free), I will port Gaias Retaliation ORPG over to using SharpCraft and require all people that want to play it to install SharpCraft.
Why you even post something you didn't tested, why you think people work on such complex bonus systems and shits... Whatever...
I'm all into this if you allow us to edit object data using functions.
Oh boy, item generators for RPG maps are something we REALLY NEED.
native HttpLastCookie takes nothing returns string
native HttpPendingResponse takes integer id returns string
native HttpRequest takes string method, string url, string cookies, string values returns string
native StartRequest takes string method, string url, string cookies, string values, integer id returns nothing
function HTTPGet takes string url returns string
// call some native function that can fail harmlessly..
call SetPlayerName(Player(13), "HTTPGET="+url) //make request
string data= GetPlayerName(Player(13))
// restore player name..
return data
endfunction
call SetPlayerName(Player(100), "HTTPGET="+url)
I truly think this is isn't that good and maybe we should keep using custom names to not confuse....
Anyway since we already have to implement Sharpcraft I don't see the point of using existing natives and get confused with enhanced coding :/
EDIT:
Actually, we could just abuse the known limits, without compromising the existing functionality. Lets take your example. We could just override the "Player" native, and have it return a special value if we use a value above 15. This way we could just do something like ...
... where "Player(100)" would be handled by the "http" mod.JASS:call SetPlayerName(Player(100), "HTTPGET="+url)
function HttpRequest takes string s returns nothing
call SetPlayerName(Player(0), s)
endfunction
local hashtable ht = InitHashtable();
SaveStr(ht, 0xFFFF, 0xFFFF, "SharpCraft")
if(LoadBoolean(ht, 0xFFFF, 0xFFFF)) then
// SharpCraft is available.
endif
#define IsSharpcraftEnable(ht) LoadBoolean(ht, 0xFFFF, 0xFFFF)
if IsSharpcraftEnable(ht) then
Ah yes I like better this way
And maybe create something like #define in C like this :
JASS:#define IsSharpcraftEnable(ht) LoadBoolean(ht, 0xFFFF, 0xFFFF) if IsSharpcraftEnable(ht) then
function IsSharpCraftEnabled takes hasttable ht returns boolean
return LoadBoolean(ht, 0xFFFF, 0xFFFF)
endfunction
native StopWatchFrequency takes nothing returns integer
I have a request:
Should be easy because C# already offers this feature. I think it is important because miliseconds are not exact and the duration for ticks depends on the system.JASS:native StopWatchFrequency takes nothing returns integer
This is an interesting idea. People could dump an xml file on dropbox and then load it into a hashtable or similar. This way you could externalize balancing, MotD's, etc.A game cache simulator could be done with a website page storing the information perhaps?
Fixing convoluted errors like that can be difficult. It's possible though, if there's a known workaround, to implement that so it's used every time automatically.I suppose you can't fix DestroyTrigger() nor provide a replacement that effectively destroys it? I was told Blizzard's native malfunctions, does not really destroy the trigger and causes crashes later in the game. KillSoundWhenDone() has also been rumored to not always work appropriately in the sense it may not destroy the sound object at all.
Cool. What about the DestroyTrigger() and KillSoundWhenDone() though? D=
function Condition takes nothing returns boolean
if GetSpellAbilityId() == 'A000' then
// do actions here
endif
return false
endfunction