Job changer script

Status
Not open for further replies.
An addon for the CMS sytem located Here

I needed a job changer script to so, I made it

In the main dir you see the dir: '_inc'
Open de dir, and you see the file: config.php
open it with your favorite php application, or use notepad.

Scroll to the end of the script and add:
Found in The Mega Guild
PHP:
/* Jobs */

$Job = array('0' => 'Visitor',
			 '111'=> 'Soldier',
			 '121'=> 'Knight',
			 '122'=> 'Champion',
			 '211'=> 'Muse',
			 '221'=> 'Mage',
			 '222'=> 'Cleric',
			 '311'=> 'Hawker',
			 '321'=> 'Raider',
			 '322'=> 'Scout',
			 '411'=> 'Dealer',
			 '421'=> 'Bourgeois',
			 '422'=> 'Artisan'
			 );

Unzip/rar in the modules dir
Version 2
(You can choise between Change your job, or Advance your job. | Change Job: Resets current skills and retrives your skill points | Advance job: Updates your job to an advance)
Version 1 (Updates your job, resets your current skills, and DOESN'T give any skill points back)


Now go to your index file in the main dir. Open de file index.php

And add a new link
Code:
<li><a href="?op=job_changer">Job changer</a></li>

And run it. It works for me


If this in any violation remove this post!
 
Last edited:
Right??
I dont understand put this in ur rose emu folder or what?
Please explain it further:)
Would be appreciated.
 
You put these files in your website htdocs usually C:\Program Files\xampp\htdocs if you installed xampp to the default folder
 
An addon for the CMS sytem located Here

I needed a job changer script to so, I made it

In the main dir you see the dir: '_inc'
Open de dir, and you see the file: config.php
open it with your favorite php application, or use notepad.

Scroll to the end of the script and add:
Found in The Mega Guild
PHP:
/* Jobs */

$Job = array('0' => 'Visitor',
             '111'=> 'Soldier',
             '121'=> 'Knight',
             '122'=> 'Champion',
             '211'=> 'Muse',
             '221'=> 'Mage',
             '222'=> 'Cleric',
             '311'=> 'Hawker',
             '321'=> 'Raider',
             '322'=> 'Scout',
             '411'=> 'Dealer',
             '421'=> 'Bourgeois',
             '422'=> 'Artisan'
             );
Unzip/rar in the modules dir


Now go to your index file in the main dir. Open de file index.php

And add a new link
Code:
<li><a href="?op=job_changer">Job changer</a></li>
And run it. It works for me


If this in any violation remove this post!

coolll man
just add log out, and do that just from lvl 100 u cant change ur job to second job?
can u?
 
Remeber that the script is ment for an other proffesion (thats how I scripted it. It removes all the skills you curently had.) But it works for a 2nd proffesion to.

There is only 1 thing. If you change it on level 100.
You don't get the amount of Skill Points back.
I tought it's you current level - 10 ... But I'm not sure, can anyone confirm it?
 
why cant we just change the class directly? without changing any skills/stat points?.

btw. i include this job change on my next release. like 3 days from now.
 
Oh? You had released a job changer script already?
why cant we just change the class directly? without changing any skills/stat points?.

Because I tought a job changer script is ment for a new job? Not an advanced one.

Anyway just to change the script every one can do it (I hope)

View 2nd post for an update
PHP:
// Were you see:
if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['update']))
{
  $sql = "UPDATE 
  		  characters 
		  SET
		  	classid='".$_POST['Job']."',
			quickbar='0',
			class_skills='0',
			class_skills_level='0'
		  WHERE
		    id='".$_POST['character']."'
		  ";
  mysql_query($sql) or die ('Sorry we couldn\'t change your proffession, please try it again.');
  			
}
Change it into:
PHP:
if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['update']))
{
  $sql = "UPDATE 
  		  characters 
		  SET
		  	classid='".$_POST['Job']."'
		  WHERE
		    id='".$_POST['character']."'
		  ";
  mysql_query($sql) or die ('Sorry we couldn\'t change your proffession, please try it again.');
  			
}

And Done...

just add log out ...
can u?

If you close your browser you are logged out. It's session based.
 
Oh? You had released a job changer script already?


Because I tought a job changer script is ment for a new job? Not an advanced one.

Anyway just to change the script every one can do it (I hope)

View 2nd post for an update
PHP:
// Were you see:
if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['update']))
{
  $sql = "UPDATE 
            characters 
          SET
              classid='".$_POST['Job']."',
            quickbar='0',
            class_skills='0',
            class_skills_level='0'
          WHERE
            id='".$_POST['character']."'
          ";
  mysql_query($sql) or die ('Sorry we couldn\'t change your proffession, please try it again.');
              
}
Change it into:
PHP:
if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['update']))
{
  $sql = "UPDATE 
            characters 
          SET
              classid='".$_POST['Job']."'
          WHERE
            id='".$_POST['character']."'
          ";
  mysql_query($sql) or die ('Sorry we couldn\'t change your proffession, please try it again.');
              
}
And Done...



If you close your browser you are logged out. It's session based.

cool man ty!
 
Status
Not open for further replies.
Back