• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Conversation 1.0.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Okay another system created for my map.
saw another system so thought upload mine too..
may find some bug but none so far so here it goes.
Srry dint put triggers though

Keywords:
conversation,system,fallen
Contents

Just another Warcraft III map (Map)

Reviews
17:59, 18th Jul 2015 BPower: Required a huge update: - Triggers in the spell description. - Proper description and a generic demo. - Map seems to be instable at the moment.

Moderator

M

Moderator

17:59, 18th Jul 2015
BPower: Required a huge update:
- Triggers in the spell description.
- Proper description and a generic demo.
- Map seems to be instable at the moment.
 
Level 4
Joined
Feb 4, 2013
Messages
43
Testmap crashes when I click on the paladin.

Using waits is not a good approach for a dialogue systems.

How should one use this system? There are a lot of trigger and folders in the map
but no manual/comments what is required.

Totally unexceptable at the moment

I dunno why it crashes. As far as trigger goes all are gui so they are pretty self explanatory. Just see they example. All triggers do some part could have put it in one trigger but thought would get complicated. most triggers can be converted into functions but i leave it to user
Again why is it crashing havent used any Jass plz specify I am curios

Also i duno why ppl hate wait so much. its not like there is alternative or anything
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
you want to wait 1 second, so instead of waiting 1 in-game second, you wait 1 second which is not 1 second, because Wait is painfully inaccurate, you wait 1 second while ignoring things like paused game or minimized game.
 
Level 4
Joined
Feb 4, 2013
Messages
43
you want to wait 1 second, so instead of waiting 1 in-game second, you wait 1 second which is not 1 second, because Wait is painfully inaccurate, you wait 1 second while ignoring things like paused game or minimized game.

hey i need some help... you said don't use wait but i having tough time not to use wait...
but i am using a function like this

a()
{
check ( if player pressed esc )
skip movie
else
wait(1 sec )
call a()

}
how to implemet like this using timers
 
Level 6
Joined
Aug 31, 2014
Messages
137
prombems short list

well first off you have that dc issue...... which could be from a jass errors... or jass gui the custom scripts.
the waits.... timer may be more of a hassle but worth it in the end waits are looked down upon and are unprofessional to submit.
gui.... creates threads which are pretty nasty not saying you must do jass but is a better way to do it.
one of the triggers is in jass which is good but could be your issue haven't looked close at it...

outdated... poorly done... needs alot of work


1/5

edit

this could solve the issue if used the right way...library
[jass=jass] TimerUtilsEx requires optional Table
/*************************************************
*
* TimerUtilsEx
* v2.1.0.2
* By Vexorian, Bribe & Magtheridon96
*
* Original version by Vexorian.
*
* Flavors:
* Hashtable:
* - RAM: Minimal
* - TimerData: Slow
*
* Array:
* - RAM: Maximal
* - TimerData: Fast
*
* All the functions have O(1) complexity.
* The Array version is the fastest, but the hashtable
* version is the safest. The Array version is still
* quite safe though, and I would recommend using it.
* The system is much slower in debug mode.
*
* Optional Requirement:
* - Table by Bribe
* - hiveworkshop.com/forums/showthread.php?t=188084
*
* API:
* ----
* - function NewTimer takes nothing returns timer
* - Returns a new timer from the stack.
* - function NewTimerEx takes integer i returns timer
* - Returns a new timer from the stack and attaches a value to it.
* - function ReleaseTimer takes timer t returns integer
* - Throws a timer back into the stack. Also returns timer data.
* - function SetTimerData takes timer t, integer value returns nothing
* - Attaches a value to a timer.
* - function GetTimerData takes timer t returns integer
* - Returns the attached value.
*
*************************************************/
// Configuration
globals
// Use hashtable, or fast array?
private constant boolean USE_HASH = false
// Max Number of Timers Held in Stack
private constant integer QUANTITY = 256
endglobals

globals
private timer array tT
private integer tN = 0
endglobals

private module Init
private static method onInit takes nothing returns nothing
static if not USE_HASH then
local integer i = QUANTITY
loop
set i = i - 1
set tT = CreateTimer()
exitwhen i == 0
endloop

set tN = QUANTITY
elseif LIBRARY_Table then
set tb = Table.create()
endif
endmethod
endmodule

// JassHelper doesn't support static ifs for globals.
private struct Data extends array
static if not USE_HASH then
static integer array data
endif
static if LIBRARY_Table then
static Table tb = 0
else
static hashtable ht = InitHashtable()
endif
implement Init
endstruct

// Double free protection
private function ValidTimer takes integer i returns boolean
static if LIBRARY_Table then
return Data.tb.boolean[-i]
else
return LoadBoolean(Data.ht, i, 1)
endif
endfunction

private function Get takes integer id returns integer
debug if not ValidTimer(id) then
debug call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, "[TimerUtils]Error: Tried to get data from invalid timer.")
debug endif
static if USE_HASH then
static if LIBRARY_Table then
return Data.tb[id]
else
return LoadInteger(Data.ht, id, 0)
endif
else
return Data.data[id - 0x100000]
endif
endfunction

private function Set takes integer id, integer data returns nothing
debug if not ValidTimer(id) then
debug call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, "[TimerUtils]Error: Tried to attach data to invalid timer.")
debug endif
static if USE_HASH then
static if LIBRARY_Table then
set Data.tb[id] = data
else
call SaveInteger(Data.ht, id, 0, data)
endif
else
set Data.data[id - 0x100000] = data
endif
endfunction

function SetTimerData takes timer t, integer data returns nothing
call Set(GetHandleId(t), data)
endfunction

function GetTimerData takes timer t returns integer
return Get(GetHandleId(t))
endfunction

function NewTimerEx takes integer data returns timer
local integer id
if tN == 0 then
static if USE_HASH then
set tT[0] = CreateTimer()
else
debug call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, "[TimerUtils]Error: No Timers In The Stack! You must increase 'QUANTITY'")
return null
endif
else
set tN = tN - 1
endif
set id = GetHandleId(tT[tN])
static if LIBRARY_Table then
set Data.tb.boolean[-id] = true
else
call SaveBoolean(Data.ht, id, 1, true)
endif
call Set(id, data)
return tT[tN]
endfunction

function NewTimer takes nothing returns timer
return NewTimerEx(0)
endfunction

function ReleaseTimer takes timer t returns integer
local integer id = GetHandleId(t)
local integer data = 0

// Pause the timer just in case.
call PauseTimer(t)

// Make sure the timer is valid.
if ValidTimer(id) then
// Get the timer's data.
set data = Get(id)

// Unmark handle id as a valid timer.
static if LIBRARY_Table then
call Data.tb.boolean.remove(-id)
else
call RemoveSavedBoolean(Data.ht, id, 1)
endif

//If it's not run in USE_HASH mode, this next block is useless.
static if USE_HASH then

//At least clear hash memory while it's in the recycle stack.
static if LIBRARY_Table then
call Data.tb.remove(id)
else
call RemoveSavedInteger(Data.ht, id, 0)
endif

// If the recycle limit is reached
if tN == QUANTITY then
// then we destroy the timer.
call DestroyTimer(t)
return data
endif
endif

//Recycle the timer.
set tT[tN] = t
set tN = tN + 1

//Tried to pass a bad timer.
debug else
debug call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, "[TimerUtils]Error: Tried to release non-active timer!")
endif

//Return Timer Data.
return data
endfunction

endlibrary

library TimerUtils requires TimerUtilsEx
endlibrary[/code]
 
Level 4
Joined
Feb 4, 2013
Messages
43
well first off you have that dc issue...... which could be from a jass errors... or jass gui the custom scripts.
the waits.... timer may be more of a hassle but worth it in the end waits are looked down upon and are unprofessional to submit.
gui.... creates threads which are pretty nasty not saying you must do jass but is a better way to do it.
one of the triggers is in jass which is good but could be your issue haven't looked close at it...

outdated... poorly done... needs alot of work


1/5

edit

this could solve the issue if used the right way...library
[jass=jass] TimerUtilsEx requires optional Table
/*************************************************
*
* TimerUtilsEx
* v2.1.0.2
* By Vexorian, Bribe & Magtheridon96
*
* Original version by Vexorian.
*
* Flavors:
* Hashtable:
* - RAM: Minimal
* - TimerData: Slow
*
* Array:
* - RAM: Maximal
* - TimerData: Fast
*
* All the functions have O(1) complexity.
* The Array version is the fastest, but the hashtable
* version is the safest. The Array version is still
* quite safe though, and I would recommend using it.
* The system is much slower in debug mode.
*
* Optional Requirement:
* - Table by Bribe
* - hiveworkshop.com/forums/showthread.php?t=188084
*
* API:
* ----
* - function NewTimer takes nothing returns timer
* - Returns a new timer from the stack.
* - function NewTimerEx takes integer i returns timer
* - Returns a new timer from the stack and attaches a value to it.
* - function ReleaseTimer takes timer t returns integer
* - Throws a timer back into the stack. Also returns timer data.
* - function SetTimerData takes timer t, integer value returns nothing
* - Attaches a value to a timer.
* - function GetTimerData takes timer t returns integer
* - Returns the attached value.
*
*************************************************/
// Configuration
globals
// Use hashtable, or fast array?
private constant boolean USE_HASH = false
// Max Number of Timers Held in Stack
private constant integer QUANTITY = 256
endglobals

globals
private timer array tT
private integer tN = 0
endglobals

private module Init
private static method onInit takes nothing returns nothing
static if not USE_HASH then
local integer i = QUANTITY
loop
set i = i - 1
set tT = CreateTimer()
exitwhen i == 0
endloop

set tN = QUANTITY
elseif LIBRARY_Table then
set tb = Table.create()
endif
endmethod
endmodule

// JassHelper doesn't support static ifs for globals.
private struct Data extends array
static if not USE_HASH then
static integer array data
endif
static if LIBRARY_Table then
static Table tb = 0
else
static hashtable ht = InitHashtable()
endif
implement Init
endstruct

// Double free protection
private function ValidTimer takes integer i returns boolean
static if LIBRARY_Table then
return Data.tb.boolean[-i]
else
return LoadBoolean(Data.ht, i, 1)
endif
endfunction

private function Get takes integer id returns integer
debug if not ValidTimer(id) then
debug call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, "[TimerUtils]Error: Tried to get data from invalid timer.")
debug endif
static if USE_HASH then
static if LIBRARY_Table then
return Data.tb[id]
else
return LoadInteger(Data.ht, id, 0)
endif
else
return Data.data[id - 0x100000]
endif
endfunction

private function Set takes integer id, integer data returns nothing
debug if not ValidTimer(id) then
debug call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, "[TimerUtils]Error: Tried to attach data to invalid timer.")
debug endif
static if USE_HASH then
static if LIBRARY_Table then
set Data.tb[id] = data
else
call SaveInteger(Data.ht, id, 0, data)
endif
else
set Data.data[id - 0x100000] = data
endif
endfunction

function SetTimerData takes timer t, integer data returns nothing
call Set(GetHandleId(t), data)
endfunction

function GetTimerData takes timer t returns integer
return Get(GetHandleId(t))
endfunction

function NewTimerEx takes integer data returns timer
local integer id
if tN == 0 then
static if USE_HASH then
set tT[0] = CreateTimer()
else
debug call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, "[TimerUtils]Error: No Timers In The Stack! You must increase 'QUANTITY'")
return null
endif
else
set tN = tN - 1
endif
set id = GetHandleId(tT[tN])
static if LIBRARY_Table then
set Data.tb.boolean[-id] = true
else
call SaveBoolean(Data.ht, id, 1, true)
endif
call Set(id, data)
return tT[tN]
endfunction

function NewTimer takes nothing returns timer
return NewTimerEx(0)
endfunction

function ReleaseTimer takes timer t returns integer
local integer id = GetHandleId(t)
local integer data = 0

// Pause the timer just in case.
call PauseTimer(t)

// Make sure the timer is valid.
if ValidTimer(id) then
// Get the timer's data.
set data = Get(id)

// Unmark handle id as a valid timer.
static if LIBRARY_Table then
call Data.tb.boolean.remove(-id)
else
call RemoveSavedBoolean(Data.ht, id, 1)
endif

//If it's not run in USE_HASH mode, this next block is useless.
static if USE_HASH then

//At least clear hash memory while it's in the recycle stack.
static if LIBRARY_Table then
call Data.tb.remove(id)
else
call RemoveSavedInteger(Data.ht, id, 0)
endif

// If the recycle limit is reached
if tN == QUANTITY then
// then we destroy the timer.
call DestroyTimer(t)
return data
endif
endif

//Recycle the timer.
set tT[tN] = t
set tN = tN + 1

//Tried to pass a bad timer.
debug else
debug call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, "[TimerUtils]Error: Tried to release non-active timer!")
endif

//Return Timer Data.
return data
endfunction

endlibrary

library TimerUtils requires TimerUtilsEx
endlibrary[/code]


I am not going to use jass plugins no matter how much you force me cause i am creating a campain of 8 maps can't compile each one of them in jngp and to test switching to we. I will if JNGP compiles for 1.26a patch of war3

and what is DC issue ?

and can someone plz tell me whether it is actually working when you run map leave coding for now. Just tell me if it is running or not
 
Level 4
Joined
Feb 4, 2013
Messages
43
if you use JNGP 2.0.7, there is a campaign compiler, which will put the maps you compile into your campaign, even running JassHelper, so you are just fine.

Even JNGP 1.5d compiles for 1.26a patch

I know they compile but I want to do rapid testing by pressing cntr f9. It can't inject your map in war3. like we does and where did you get jngp 2 from plz share it in HIVE
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
there is a thread created by moyackx(I hope I spelled it right), but it brings you to blizzard modding or however is the website called.

2.0.7's campaign builder will upon saving map like normally additionally add it to the campaign, like I said
 
Top