| | Might be able to help | |
| | Author | Message |
---|
Lady_Pheonix
Posts : 2 Join date : 2007-11-21
![Might be able to help Empty](https://2img.net/i/empty.gif) | Subject: Might be able to help Wed Nov 21, 2007 9:45 pm | |
| Well i've never scripted for CO games, but i've been scripting and coding for RO (Ragnarok Online) games for abour 2 years now. If you would simply show me how to do it for CO, i'd be totally into it. xD | |
| ![Go down](https://2img.net/i/empty.gif) | | KraHen Admin
![Admin Admin](https://2img.net/i/itest/ranks/sword/sword8.gif)
![KraHen](https://2img.net/u/1214/57/66/78/avatars/1-52.jpg)
Posts : 43 Join date : 2007-11-17 Location : http://co2trans.co.nr
![Might be able to help Empty](https://2img.net/i/empty.gif) | Subject: Re: Might be able to help Thu Nov 22, 2007 1:19 am | |
| Sure and thanks! ![Smile](https://2img.net/i/fa/i/smiles/icon_smile.gif)
Mostly is all about C#. I`m not very familiar this either, but i know a bit about this scripting (a bit really means a bit:lol!: )
I think that the QOScript works at my Emu aswell, we must try it, if it doesn`t, than use the classic C#.
http://www.qonquer.com/qoscript.html
Here is the link above for the commands, and here is an example NPC script :
This is a very simple Quest NPC - Quote :
- // Written by Qonquer May 3rd 2006
// NPC ID: 30164 (Mike)
// Location: Map 1000 Desert City 486,618
/*
This is not the actual NPC for Mike, it is
just an example Script that I was asked to
provide on the forum for reference purposes
*/
String[] dlg=null;
switch(option)
{
case -1:
{
String[] tm={
"AVATAR 1",
"TEXT If you bring me 1 Emerald, 2 Normal Gems and 100,000 silver I will give you 5 Meteors",
"OPTION0 I have the things!",
"OPTION1 Where do I get an Emerald?",
"OPTION-1 I see, thank you."
};
dlg=tm;
break;
}
case 0:
{
int gems=count(700001)+count(700011)+count(700021)+count(700031)+count(700041)+count(700051)+count(700061)+count(700071);
if(gems<2 || count(1080001)<1 || money()<100000)
{
String[] tm={
"AVATAR 1",
"TEXT You do not have all the things I asked for",
"OPTION-1 Sorry"
};
dlg=tm;
break;
}
if(invSize()>=39)
{
String[] tm={
"AVATAR 1",
"TEXT You do not have enough room in your inventory",
"OPTION-1 Oops Silly Me"
};
dlg=tm;
break;
}
int u=0;
u+=delitem(700001,2);
if(u<2) u+=delitem(700011,2-u);
if(u<2) u+=delitem(700021,2-u);
if(u<2) u+=delitem(700031,2-u);
if(u<2) u+=delitem(700041,2-u);
if(u<2) u+=delitem(700051,2-u);
if(u<2) u+=delitem(700061,2-u);
if(u<2) u+=delitem(700071,2-u);
delitem(1080001,1);
addmoney(-100000);
for(int i=0; i<5; i++)
atcommand("@item 1088001");
String[] tm={
"AVATAR 1",
"TEXT Thank you, here are your Meteors. Enjoy!",
"OPTION-1 Bye"
};
dlg=tm;
break;
}
case 1:
{
String[] tm={
"AVATAR 1",
"TEXT The Hill Monsters around the abandoned village near Desert City may drop an Emerald",
"OPTION-1 OK Thanks"
};
dlg=tm;
break;
}
}
if(dlg!=null)
dialog(dlg); Hope this helps you!
| |
| ![Go down](https://2img.net/i/empty.gif) | | ianblaise
Posts : 4 Join date : 2007-11-23
![Might be able to help Empty](https://2img.net/i/empty.gif) | Subject: Re: Might be able to help Fri Nov 23, 2007 1:07 pm | |
| I know some C# I posted a script in the NPC section (SUPERGMNPC) It gives items to players by simply pushing their class, and all of that, it is very user friendly ^^ just put it in NPC Dioloug, and it should work. | |
| ![Go down](https://2img.net/i/empty.gif) | | Lady_Pheonix
Posts : 2 Join date : 2007-11-21
![Might be able to help Empty](https://2img.net/i/empty.gif) | Subject: Re: Might be able to help Fri Nov 23, 2007 6:23 pm | |
| - Admin wrote:
- Sure and thanks!
![Smile](https://2img.net/i/fa/i/smiles/icon_smile.gif)
Mostly is all about C#. I`m not very familiar this either, but i know a bit about this scripting (a bit really means a bit:lol!: )
I think that the QOScript works at my Emu aswell, we must try it, if it doesn`t, than use the classic C#.
http://www.qonquer.com/qoscript.html
Here is the link above for the commands, and here is an example NPC script :
This is a very simple Quest NPC
- Quote :
- // Written by Qonquer May 3rd 2006
// NPC ID: 30164 (Mike)
// Location: Map 1000 Desert City 486,618
/*
This is not the actual NPC for Mike, it is
just an example Script that I was asked to
provide on the forum for reference purposes
*/
String[] dlg=null;
switch(option)
{
case -1:
{
String[] tm={
"AVATAR 1",
"TEXT If you bring me 1 Emerald, 2 Normal Gems and 100,000 silver I will give you 5 Meteors",
"OPTION0 I have the things!",
"OPTION1 Where do I get an Emerald?",
"OPTION-1 I see, thank you."
};
dlg=tm;
break;
}
case 0:
{
int gems=count(700001)+count(700011)+count(700021)+count(700031)+count(700041)+count(700051)+count(700061)+count(700071);
if(gems<2 || count(1080001)<1 || money()<100000)
{
String[] tm={
"AVATAR 1",
"TEXT You do not have all the things I asked for",
"OPTION-1 Sorry"
};
dlg=tm;
break;
}
if(invSize()>=39)
{
String[] tm={
"AVATAR 1",
"TEXT You do not have enough room in your inventory",
"OPTION-1 Oops Silly Me"
};
dlg=tm;
break;
}
int u=0;
u+=delitem(700001,2);
if(u<2) u+=delitem(700011,2-u);
if(u<2) u+=delitem(700021,2-u);
if(u<2) u+=delitem(700031,2-u);
if(u<2) u+=delitem(700041,2-u);
if(u<2) u+=delitem(700051,2-u);
if(u<2) u+=delitem(700061,2-u);
if(u<2) u+=delitem(700071,2-u);
delitem(1080001,1);
addmoney(-100000);
for(int i=0; i<5; i++)
atcommand("@item 1088001");
String[] tm={
"AVATAR 1",
"TEXT Thank you, here are your Meteors. Enjoy!",
"OPTION-1 Bye"
};
dlg=tm;
break;
}
case 1:
{
String[] tm={
"AVATAR 1",
"TEXT The Hill Monsters around the abandoned village near Desert City may drop an Emerald",
"OPTION-1 OK Thanks"
};
dlg=tm;
break;
}
}
if(dlg!=null)
dialog(dlg); Hope this helps you!
Ohhh I see, kinda simular to RO quest scripting. Well i'll do a little study on C# and see what I can do. =P | |
| ![Go down](https://2img.net/i/empty.gif) | | Sponsored content
![Might be able to help Empty](https://2img.net/i/empty.gif) | Subject: Re: Might be able to help ![Might be able to help Icon_minitime](https://2img.net/i/fa/icon_minitime.gif) | |
| |
| ![Go down](https://2img.net/i/empty.gif) | | | Might be able to help | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |