Questions regarding my server

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Questions regarding my server

Post by TeoTwawki » Thu Jun 05, 2014 8:13 am

cubia wrote:OMG, your scripts are so different from mine, thats crazy. I have no skills so i cannot write something like you've done... i am jealous lol.

I dont really get how you've managed to write all of this but i can definetly use it as example to learn so thats freaking awesome, thanks for sharing it, really !

Learning is frustrating and interesting at the same time, never coded or used scripts before...

May i ask how you've learned ? You've started from scratch or you somehow had another script to use as example and went from there ?
I'm just a chronic reader, tons of examples all over scripts dirs.

About that removed check: on retail players can join other nation, progress past mission, and still get and use a red letter later to switch nations without the usual medal costs.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

cubia
Posts: 44
Joined: Wed May 21, 2014 5:44 am

Re: Questions regarding my server

Post by cubia » Thu Jun 05, 2014 8:18 am

Oh yeah, you're talking about South Sandy NPC. Indeed, the NPC was already in there but i didn't check the original script. All i know is that when i gave myself the keyitem as a gm by using @addkeyitem XXX, and talked to Mainchilite (whatever the npc name was lol), nothing was triggered. So i am assuming something had to be fixed and you did ?

I'll have to compare both scripts !

cubia
Posts: 44
Joined: Wed May 21, 2014 5:44 am

Re: Questions regarding my server

Post by cubia » Thu Jun 05, 2014 8:28 am

Hmmm indeed, with you script, garlaige citadel S Npc works like a charm but when talking to south sandy S NPC, i get this (with the original script) :

Image

For learning purposes and in order to manage to fix all WOTG missions, i will try to compare both script and what has changed from the retail one to yours since even holding the keyitem doesn't trigger the cutscene !

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Questions regarding my server

Post by TeoTwawki » Thu Jun 05, 2014 8:36 am

cubia wrote:Hmmm indeed, with you script, garlaige citadel S Npc works like a charm but when talking to south sandy S NPC, i get this
Your version of the 2nd NPC involved needs checks to look for the KI then if found do a diff cs. The version of him I posted has all his possibilities in the comments for future editing :) because I haven't finished him yet.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

cubia
Posts: 44
Joined: Wed May 21, 2014 5:44 am

Re: Questions regarding my server

Post by cubia » Thu Jun 05, 2014 8:40 am

Not sure if i could do scripts with "all possibilities" for future editing, i am lacking knowledge, clearly ! I will try to fix it without looking at your script, just make sure he checks for the keyitem and trigger the right cs. If i don't have it, let it be and if the cs is already triggered, another event i guess ?

Thats the difficult part about scripting npc. You have to check all cs, make sure that if you have the keyitem, that you dont get it twice, if you have it, to trigger another cs, if the quest is not activated, to not receive the said keyitem etc... And thats already difficult with single quested NPC, i cant imagine how it goes with NPC that triggers tons of quests... Ewwww

cubia
Posts: 44
Joined: Wed May 21, 2014 5:44 am

Re: Questions regarding my server

Post by cubia » Thu Jun 05, 2014 9:36 am

-----------------------------------
-- Area: Southern SandOria [S]
-- NPC: Mainchelite
-- @zone 80
-- @pos -16 1 -30
-----------------------------------

-----------------------------------
-- onTrade Action
-----------------------------------

function onTrade(player,npc,trade)
end;

-----------------------------------
-- onTrigger Action
-----------------------------------

function onTrigger(player,npc)
player:startEvent(0x00F);
end;

-----------------------------------
-- onEventUpdate
-----------------------------------

function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;

-----------------------------------
-- onEventFinish
-----------------------------------

function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
Thats... quite empty haha !

Guess i'll have a difficult time figuring it out on my own, but no other option if i want to learn some writing... !

Post Reply