- Joined
- Jun 23, 2007
- Messages
- 4,066
Download: th-ghost-v1.0.0-beta2.zip (demo map in maps folder)
Github: triggerhappy187/th-ghost
For a while now I have been working on a hostbot that allows maps to make HTTP requests from within JASS. This means it doesn't require any third party tools for the user, they simply need to join a map hosted by a hostbot which most people do already anyway. I have created a few vJass libraries that allow you to use the functionality with ease. You can make a request in one function call and get the response in a callback.
I have been meaning to properly release this but I had been working on a feature that would allow you to monetize your map with an item mall as well as provide an API to store data onto a centralized server similar to how they are doing it in China. It's on hold for now so I decided I didn't want this to just sit in Github without anyone knowing about it. In it's current state you are fully able to create your own item mall if you want.
HTTP requests are just one feature. The underlying system is called W3HMC (Warcraft III Hostbot to Map Communication) or HMC. With this system you can send data from the hostbot to the map. Currently you can make web requests, get the current time or the time when the map started, and get a players realm. The way it basically works is by adding a fake player to the lobby. This fake player will then spoof chat message events (not seen by anyone) when the hostbot wants to send a string to the map.
For more information check out the github and wiki (very much a WIP).
I have created a special API that can allow people with no knowledge of JASS or servers to store data onto my server.
Download is at the top of the post with a demo map included.
Github: triggerhappy187/th-ghost
For a while now I have been working on a hostbot that allows maps to make HTTP requests from within JASS. This means it doesn't require any third party tools for the user, they simply need to join a map hosted by a hostbot which most people do already anyway. I have created a few vJass libraries that allow you to use the functionality with ease. You can make a request in one function call and get the response in a callback.
JASS:
private function OnReady takes nothing returns boolean
local WebRequest req = GetTriggerWebRequest()
call BJDebugMsg(GetTriggerWebResponse())
call req.destroy()
return false
endfunction
private function StartRequest takes nothing returns nothing
call HttpGet("https://www.hiveworkshop.com/attachments/file-txt.293355/", Filter(function OnReady))
endfunction
HTTP requests are just one feature. The underlying system is called W3HMC (Warcraft III Hostbot to Map Communication) or HMC. With this system you can send data from the hostbot to the map. Currently you can make web requests, get the current time or the time when the map started, and get a players realm. The way it basically works is by adding a fake player to the lobby. This fake player will then spoof chat message events (not seen by anyone) when the hostbot wants to send a string to the map.
For more information check out the github and wiki (very much a WIP).
I have created a special API that can allow people with no knowledge of JASS or servers to store data onto my server.
-
SaveGold
-
Events
-
Player - Player 1 (Red)'s Current gold becomes Greater than or equal to 0.00
-
-
Conditions
-
Actions
-
Set goldvalue = ((Triggering player) Current gold)
-
Custom script: call SetServerValue(GetTriggerPlayer(), "gold", I2S(udg_goldvalue))
-
-
-
LoadGold
-
Events
-
Time - Elapsed game time is 0.00 seconds
-
-
Conditions
-
Actions
-
Custom script: set udg_goldvalue = S2I(GetServerValueWithWait(Player(0), "gold"))
-
Player - Set Player 1 (Red) Current gold to goldvalue
-
-
Download is at the top of the post with a demo map included.