Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Graal Kingdoms Team (https://forums.graalonline.com/forums/forumdisplay.php?f=205)
-   -   Scripting Position Available (https://forums.graalonline.com/forums/showthread.php?t=81693)

Tigairius 09-06-2008 11:07 PM

Scripting Position Available
 
Graal Kingdoms Scripting
In applying to become a Graal Kingdoms scripter you must meet some requirements. This is a serious position, so I'd like serious applications.

I am not requiring someone to be extremely skilled with scripting, do not feel intimidated. I will always be here to help and guide you when you need help.

I am, however, requiring the applicant to know decent scripting skills and have experience with client-to-serverside scripting.
Please write in the thread below with some of your experiences, examples of your work, and some interesting facts about you that you think is relevant.

Thanks, and good luck.

warmaster70229 09-14-2008 11:38 PM

Application.
 
Well, as some of you likely know, I've been wanting to help out on Graal Kingdoms for while now...

I have a large amount of experience in Graal script, namely RPG-Systems and other out of the ordinary systems, and have created many such systems on servers such as Zodiac, and other Unlisted servers.

As for experience, I think you'll have a great deal of trouble finding a server that at least ONE of the staff members hasn't worked with me, but of course there are exceptions to this.
I believe what would really set me apart from other scripters is my experience, I have experimented with pretty much every language out there, (Including several assemblers) and have a good understanding of how advanced systems work. My ability to adapt would also be another key-point.

ApothiX 12-04-2008 06:30 PM

Let me know if you want me to help you out. I've been pretty bored lately, and would be willing to upgrade my account if there are things that actually need to be scripted. When I last had Debug, I pretty much sat there and did nothing because no one would let me do anything D:

Tigairius 06-23-2009 10:00 PM

I still need a good scripter who is good and doesn't say they'll work for you forever and then quit in a week.

Vman13x 06-24-2009 07:39 AM

ME ME ME!! Na jk I dont script, but Id like to learn :D.

Draenin 06-24-2009 07:53 AM

I need to log on to testbed more often and update things I was working on in the shared folder. :[

Draenin 06-27-2009 12:43 PM

Sorry to double-post, but I've dredged up some scripts that I was working on.

Keep in mind these are kind of amateurish, but I did these while learning on testbed. They're sort of primitive attempts at assembling a battle system from scratch with very little experience. It's mostly for input / output purposes, and testing to make sure numbers are calculated as they should be.

PHP Code:

//d20-Style Attack Roll

//#CLIENTSIDE
function onKeyPressed() { 
   if (
keydown(5)) {
     
findWeapon("Shared/DraeninPolyhedrals").Rolld20();
     if (
client.d20 == 1){
       
player.chat "Miss! 0 Damage!";
       }
     
//Melee Attack//
     
else if (client.d20 == 20){
       
player.chat "Critical! " @ (client.level+client.atk+client.str+int(random(1,6)))*" Damage!";
       }
     else
       
player.chat client.level+client.atk+client.str+int(random(1,6)) @ " Damage!";
   }


PHP Code:

//Commands

//#CLIENTSIDE
 
function onPlayerChats(){
   
temp.tokens player.chat.tokenize();
   if (
tokens[0] == ":setlevel"){
     
client.level tokens[1];
     
client.maxhp = (client.con+client.level)*5;
     
client.maxmp = (client.int+client.level)*3;
     
client.hp client.maxhp;
     
client.mp client.maxmp;
   }


PHP Code:

//Equips

//#CLIENTSIDE
function onPlayerChats(){
    if(
player.chat ":sword"){
      
client.atktype "melee";
      
client.atk 10;
    }
    if(
player.chat ":bow"){
      
client.atktype "ranged";
      
client.atk 6;
    }
    if(
player.chat ":wand"){
      
client.atktype "magic";
      
client.atk 4;
    }
    if(
player.chat ":unarmed"){
      
client.atktype "melee";
      
client.atk 2;
    }
    if(
player.chat == ":drink poison"){
      
client.hp -= 5;
    }
    else if(
player.chat == ":drink potion"){
      
client.hp += 10;
    }
    
findWeapon("Shared/DraeninStatRoll").checkhp();
    
findWeapon("Shared/DraeninStatDisplay").drawhp();


PHP Code:

//Stat Roll

//#CLIENTSIDE
public function Rolld20(){
     
client.d20 int(random(1,21));
}

public function 
Rolld12(){
     
client.d12 int(random(1,13));     
}

public function 
Rolld10(){
     
client.d10 int(random(1,11));
}

public function 
RolldPercent(){
     
client.dpercent int(random(1,11)*10);
}

public function 
Rolld6(){
     
client.d6 int(random(1,7));
}

public function 
Rolld4(){
     
client.d4 int(random(1,5));


PHP Code:

//Stat Display

//#CLIENTSIDE
function onCreated() {
  
this.img1 findimg(1);
  
with (this.img1) {
    
style "c";
    
zoom 0.75;
  }
  
setTimer(0.05);
}

function 
onTimeout() {
  
with (this.img1) {
    
text "Level: " client.level "     " client.hp " / " client.maxhp " HP     " client.mp " / " client.maxmp " MP";
    
player.1.5;
    
player.1.5;
  }
  
setTimer(0.05);



Numbers and stuff like that are mainly what I'm interested in working with, though I'm sure with some practice I could easily get used to working with movements and so on as well. I also would like to learn how to work with classes so new object NPCs could possibly be made, and even perhaps dabble in event sequences.

I know I may not be the best for the job compared to others, but I've never had any sort of real mentoring, and it could make a difference.

Gambet 06-27-2009 06:47 PM

Quote:

Originally Posted by Draenin (Post 1502151)
Stuff

You don't need to use findWeapon() anymore in cases like the one that you're doing. With GS2, object-oriented programming was introduced and weapons can be treated as objects so you just refer to the object by its name and call the function like such: weaponName.function().

For the random rolling thing you should have one main function instead of a bunch of separate ones (like you currently have Rolld4, Rolld6, Rolld10, etc.), and you really only need to have one function in which you pass the number as a parameter (4, 6, 10, etc.) and then you can do makevar("client.d" @ params[0]) = int(random(1, params[0] + 1)).

And for the chatting stuff you should use if-else-if (currently you just have a bunch of if statements with only one else when they should all have them in this case (there are situations where adding it wouldn't make sense but this isn't one of them).

Just some things I noticed at a quick glance, was originally not going to mention anything since this is a hiring thread and all but you said that you never got mentored before so consider it a friendly lesson. Hope you keep working at it! :)

Chompy 06-27-2009 08:00 PM

Quote:

Originally Posted by Gambet (Post 1502192)
You don't need to use findWeapon() anymore in cases like the one that you're doing. With GS2, object-oriented programming was introduced and weapons can be treated as objects so you just refer to the object by its name and call the function like such: weaponName.function().

Underlined part is wrong :D
It's not possible to do Shared/DraeninStatRoll.function();
As / is a math operator and will conflict.

The use of findweapon() is like the use of get and set functions. ^^

DustyPorViva 06-27-2009 08:16 PM

Can't you do something like:
("Shared/DraeninStatRoll"@).function();

Or such, however(I'm not very good at concat'ing things like that, so it's probably wrong)?

Chompy 06-27-2009 08:19 PM

Quote:

Originally Posted by DustyPorViva (Post 1502211)
Can't you do something like:
("Shared/DraeninStatRoll"@).function();

Or such, however(I'm not very good at concat'ing things like that, so it's probably wrong)?

You can do "Shared/DraeninStatRoll".function(); and it works, but that isn't very object oriented though.

cbk1994 06-27-2009 09:21 PM

Quote:

Originally Posted by DustyPorViva (Post 1502211)
Can't you do something like:
("Shared/DraeninStatRoll"@).function();

Or such, however(I'm not very good at concat'ing things like that, so it's probably wrong)?

Simply ("Shared/DraeninStatRoll").function() would work fine.

Draenin 06-27-2009 09:26 PM

Well, I'm still learning this stuff. I just set it out as an example of what I've done, and as part of my application. (I figured I may as well at least try.)

However, I do appreciate the help. :D


The main problem I've always had with gscript is knowing all the commands and all the little shortcuts you can use to make scripts smaller and more robust. I can do a fair amount of programming, but knowing the language inside and out is something I still have to work on. Knowing all the words and commands is what really trips me up most of the time, but all that can always be learned. Following the logical sequence of programming has never been difficult for me though. Even when messing around with conditional branches and so on.

Gambet 06-27-2009 09:43 PM

Quote:

Originally Posted by Chompy (Post 1502206)
It's not possible to do Shared/DraeninStatRoll.function();
As / is a math operator and will conflict.


Of course not, I didn't say for him to do Shared/DraeninStatRoll.function() I just stated that with GS2 you would normally do weaponName.function(). In this case, you would do ("Shared/DraeninStatRoll").function().


All times are GMT +2. The time now is 12:21 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.