-
Featured Topics
-
Latest Commits
-
Topics
-
Posts
-
By Louis T Steinhil · Posted
I am trying to make a script called Card Collection NPC all is working now but the main problem I'm encountering is when I submit the card it will give the bonus stats in return. I will immediately close the server via console without letting the character logout so now I got 20 Abysmal Knight Card which should be 10 only because I already submitted it. I use only setd / getd in storing variables. And I get the part why it's duplicating because there's a delay in saving data to sql right? So how do I prevent this? -
By Louis T Steinhil · Posted
Oh thanks man, this works. Now every duplicate has group and title. -
Most likely your db is too new for your code. Try copying this commit: https://github.com/HerculesWS/Hercules/commit/bb5064f4f8e63364ddc8cb7523ebc3a7def905ed
-
The error is due to the main NPC not being in a map. As it is not in a map, Herc most likely didn't initialize unit data for it (since it would be useless). Either put it in a map or add a check to not apply unitdata for it. Here is how to do the 2nd option: OnInit: if (strnpcinfo(NPC_MAP) == "") // Not in a map, can't set view data end; setunitdata(getnpcid(), UDT_GROUP, 1); setunittitle(getnpcid(), "Goddess Statue"); end;
-
That's weird... cvc was implemented together with the clan system, not having cvc would mean you don't have the clan system too. I do recommend updating though, since it is there since 2017. But here is the PR that introduced it: https://github.com/HerculesWS/Hercules/pull/1718
-
-
Download Statistics