P Server "NPC base code/shops/drop items" for who asked me 2 do it

06/24/2008 18:55 adz06676#976
Quote:
Originally Posted by tjhancock101 View Post
wtf, i cant find tht in teh whole chat.cs, also can sumoen help me, i edited in new commands and packets into my chat.cs, i build and save, it look like th enew commands, but in teh server only the old commands work, i dont get it, i restarted server and everything
You have to add it to the char.cs ughh i'll talk u through it here is the gm command code:
Quote:
if (TheClient.Status == 8)
{

if (Splitter[0] == "/effect")
{
string effectname = Splitter[1];
WorldHandler.Effect(TheClient.MyChar, effectname);
}
that would make the command /effect only available to gms.
06/24/2008 20:01 GRASSHOPPA#977
anybody know of a way to make npcs delay or something?
like they only work at a certain time of the day

all i need to know is some basic info and i can probly do trial and error till i get it workin =/
06/24/2008 20:31 tony_987#978
dirtydozen@ your working on exp on your server?
06/24/2008 21:00 stephanyd#979
I tried to make my OldGeneralYang to give 1 hour double exp but won't work... Can some1 tell me how?
06/24/2008 21:12 Yuhawn#980
- Hey,Anyone know how add npc for making guild,and the guild war,please


- Thanks so much sam. :)
06/24/2008 21:17 adz06676#981
Quote:
Originally Posted by tony_987 View Post
dirtydozen@ your working on exp on your server?
Yeh removed lvling from monsters cuz i'm not liking the lag and i've added lvling from pking :p just needs a few fixes.

Quote:
Originally Posted by stephanyd View Post
I tried to make my OldGeneralYang to give 1 hour double exp but won't work... Can some1 tell me how?
We will need to see the coding behind exp,x2 in ur npcdialog.cs
06/24/2008 21:36 YukiXian#982
Quote:
Originally Posted by adz06676 View Post
You have to add it to the char.cs ughh i'll talk u through it here is the gm command code:


that would make the command /effect only available to gms.
You may also know how to send all people an message? Something like this :

Code:
WorldHandler.SendAll(ThePackets.Sendmsg(TheClient.MessageID, "System" and all things here
But that doesn't work, May u know how to fix it?:p
06/24/2008 21:39 stephanyd#983
Is my coding for OldGeneral ok?...I'm a noob in coding:(
06/24/2008 21:44 adz06676#984
Quote:
Originally Posted by YukiXian View Post
You may also know how to send all people an message? Something like this :

Code:
WorldHandler.SendAll(ThePackets.Sendmsg(TheClient.MessageID, "System" and all things here


But that doesn't work, May u know how to fix it?:p
Havn't tried and worldhandler.sendall isnt a chat / message type, it would teleport every char to the location of your choice.

Quote:
Originally Posted by stephanyd View Post
Is my coding for OldGeneral ok?...I'm a noob in coding:(
I havnt tried doing exp since i removed it and edited it on mine but, the UID shoudlnt be 30 it should be 19 also mychar.exp.x2 is wrong remove the .x2 then the rest is up to you whether that will work i don't know
06/24/2008 22:09 tao4229#985
LOL, Adz, i was trying that thing for GM commands for ever, and i kept using TheClient.Status == "8" >_<, i was about to just be like.. if(TheClient.MyChar.CharName.Contains("[GM]")
{....
But, God... i need to learn more about coding >.<
06/24/2008 22:21 adz06676#986
Quote:
Originally Posted by tao4229 View Post
LOL, Adz, i was trying that thing for GM commands for ever, and i kept using TheClient.Status == "8" >_<, i was about to just be like.. if(TheClient.MyChar.CharName.Contains("[GM]")
{....
But, God... i need to learn more about coding >.<
Lol i started like that although i'm still a nub compared to sam
06/24/2008 22:42 Huseby#987
Quote:
Originally Posted by stephanyd View Post
I tried to make my OldGeneralYang to give 1 hour double exp but won't work... Can some1 tell me how?
ehh dubble exp most maby be coded first?

@dirydozen
You got one dc as i noticed and that was 110 promo and that delited all your current gear, so if u had lottery first youv get screwd. look at Tangoras source, his inve works :P
06/24/2008 22:47 YukiXian#988
Quote:
Quote:
Originally Posted by YukiXian View Post
You may also know how to send all people an message? Something like this :

Code:
WorldHandler.SendAll(ThePackets.Sendmsg(TheClient.MessageID, "System" and all things here
But that doesn't work, May u know how to fix it?:p
Quote:
Originally Posted by adz06676 View Post
Havn't tried and worldhandler.sendall isnt a chat / message type, it would teleport every char to the location of your choice.



I havnt tried doing exp since i removed it and edited it on mine but, the UID shoudlnt be 30 it should be 19 also mychar.exp.x2 is wrong remove the .x2 then the rest is up to you whether that will work i don't know

@ adz06676, Well, .. If its wrong, Could you tell me what the Right one is ? :p

Other Question : ( To anyone who know about NPCs ) :D
I don't understand the NPC's Cuz look this , :

Quote:
[NpcType2]
Name=Barber
SimpleObjID=266
StandByMotion=999266100
BlazeMotion=999266102
RestMotion=999266101
Effect=none
ASB=5
ADB=6
FixDir=0
U can find that in the npc.ini ( Located in the Qonquer Online Client )
So, Thats the barber, but were in that i can see the barber ID ?

Here is the line in the NPCs.txt

Quote:
12;10002;412;376;26;2;0;1002
( Located in the Source\Bin\Debug Folder )
I don't see anything is the same form there, So... How can i add an NPC based on the npc.ini ?
06/24/2008 22:50 stephanyd#989
Quote:
Originally Posted by huseby View Post
ehh dubble exp most maby be coded first?
I'm trying to code it... i did what adz said but no icon appear on upper left corner:(... If some1 know wich file i have to work exactly and the code to enter it would be nice;)
06/24/2008 22:58 bobtin777#990
Would a timer be like this
Code:
                        TheClient.SendPacket(ThePackets.Vital2((long)TheClient.MyChar.UID, TheClient.MyChar.CurHP));
                        TheClient.MyChar.CanFillHp = false;
                        TheClient.MyChar.HPTimer.Start();
                    }
                    else
                        TheClient.SendPacket(ThePackets.SendMsg(TheClient.MessageId,"SYSTEM",TheClient.MyChar.CharName,"You have to wait 1 minute before you can fill your hp with comamnd again.",2000));
                }