Shinobi Legends Forum - Shinobi Legends Game Site

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ever wondered if your ideas have been talked about in the forum already? Well, try out the "search" option, where all your questions can be answered.

Pages: [1] 2

Author Topic: What would you like as a mission for your home country?(fire,water etc.)  (Read 4165 times)

Sasuke X

  • Guest

I made a topic in new features about adding different ranked missions and different missions for every country. I have many idea's but if Neji is going to do this, i'll probaly need more ideas for missions... i don't really know if Neji wants to do it, but somebody told me i should start a topic and ask people's idea's for missions... so yeah... if you have an idea for a price to do the mission and a reward post that too please. As of now though, this is just for fun and my curiosity...
Logged

Neji

  • Administrator
  • Hero Member
  • *****
  • Karma: +459/-86
  • Offline Offline
  • Posts: 7113
    • View Profile
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #1 on: October 11, 2006, 11:28:13 PM »

you would need somebody to code them.
Logged
Never judge a cow by its udder.

Sasuke X

  • Guest
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #2 on: October 11, 2006, 11:42:09 PM »

Hmm... Neji could you exactly explain HOW to code something? I don't even know what that means/ what you do to do it. :shock: and i'm aware that i would need someone to code it ;) I already know it probaly won't happen especially if i can't find a person to code it. :)
Logged

Neji

  • Administrator
  • Hero Member
  • *****
  • Karma: +459/-86
  • Offline Offline
  • Posts: 7113
    • View Profile
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #3 on: October 11, 2006, 11:46:47 PM »

Gladly I help.

The dag bounty system handles everything ... from the offer to the accept to the reward.

Here is one module that uses this core system, you know it, it is the minotaur quest.

Code: [Select]
<?php

require_once("lib/http.php");
require_once(
"lib/villagenav.php");

function 
dagminotaur_getmoduleinfo(){
$info = array(
"name"=>"Minotaur Quest",
"version"=>"1.0",
"author"=>"`%Sneakabout`^",
"category"=>"Quest",
"download"=>"core_module",
"settings"=>array(
"Minotaur Quest Settings,title",
// reward types.
"rewardgold"=>"What is the gold reward for the Minotaur Quest?,int|1000",
"rewardgems"=>"What is the gem reward for the Minotaur Quest?,int|2",
"experience"=>"What is the quest experience multiplier for the Minotaur Quest?,floatrange,1.01,1.1,0.01|1.04",
"minlevel"=>"What is the minimum level for this quest?,range,1,15|5",
// in the future min DKs might get put here too.
"maxlevel"=>"What is the maximum level for this quest?,range,1,15|9",
),
"prefs"=>array(
"Minotaur Quest Preferences,title",
"status"=>"How far has the player gotten in the Minotaur Quest?,int|0",
// 0 is not taken, 1 is in progress, 2 is completed, 3 is failed,
// 4 is failed through choice/ignoring it and 5 is reward pending.
// Above 5 can be used for stages of completion.
        
),
        
"requires"=>array(
       "dagquests"=>"1.1|By Sneakabout",// central module to hook into.
),
);
return $info;
}

function 
dagminotaur_install(){
module_addhook("village");
module_addhook("dragonkilltext");
module_addhook("newday");
module_addhook("dagquests");
return true;
}

function 
dagminotaur_uninstall(){
return true;
}

function 
dagminotaur_dohook($hookname,$args){
global $session;
switch ($hookname) {
case "village":
if ($session['user']['location']==
getsetting("villagename"LOCATION_FIELDS)) {
tlschema($args['schemas']['gatenav']);
addnav($args['gatenav']);
tlschema();
// The turns get checked later, so that people don't ask where
// the link is :(
if (get_module_pref("status")==1) {
addnav("Search the Caves (1 turn)",
"runmodule.php?module=dagminotaur&op=search");
}
}
break;
case "dragonkilltext":
// DK reset.
set_module_pref("status",0);
break;
case "newday":
if (get_module_pref("status")==&&
$session['user']['level']>get_module_setting("maxlevel")) {
// if they get beyond the level range.
set_module_pref("status",4);
output("`n`6You hear that another adventurer defeated the minotaur plaguing the Caves.`0`n");
require_once("modules/dagquests.php");
dagquests_alterrep(-1);
}
break;
case "dagquests":
if (get_module_pref("status")==5) {
// giving the reward if quest completed. No chance of both
// triggering.
$goldgain=get_module_setting("rewardgold");
$gemgain=get_module_setting("rewardgems");
$session['user']['gold']+=$goldgain;
$session['user']['gems']+=$gemgain;
debuglog("got a reward of $goldgain gold and $gemgain gems for slaying a minotaur.");
if ($goldgain && $gemgain) {
output("`3`n`nYou hand Dag the minotaur's head, and Dag pays you the bounty of `^%s gold`3 and a pouch of `%%s %s`3!",$goldgain,$gemgain,translate_inline(($gemgain==1)?"gem":"gems"));
} elseif ($gemgain) {
output("`3`n`nYou hand Dag the minotaur's head, and Dag pays you the bounty of a pouch of `%%s %s`3!",$gemgain,translate_inline(($gemgain==1)?"gem":"gems"));
} elseif ($goldgain) {
output("`3`n`nYou hand Dag the minotaur's head, and Dag pays you the bounty of `^%s gold`3!",$goldgain);
} else {
output("`3`n`nYou hand Dag the minotaur's head, but Dag cannot find the bounty to pay you!");
}
set_module_pref("status",2);
require_once("modules/dagquests.php");
dagquests_alterrep(2);
$args['questoffer']=1;
// complete after reward is given.
}
// Another quest is set!
if ($args['questoffer']) break;

// checking requirements and setting status.
if (get_module_setting("minlevel")<=$session['user']['level'] &&
$session['user']['level']<=get_module_setting("maxlevel") &&
!get_module_pref("status")) {
output("He seems very busy, but when you ask him about work, he looks at you carefully and motions you closer.`n`n");
output("\"Aye, there be something ye might be helpin' me wit'.... there be rumours of a half-man beast that be preyin' on adventurers. It be operatin' from a nearby cave. It seems t' be reasonably smart, and the normal guards ain't bein' the sort to take the thing on. Ye look like ye can handle yerself, and there be a bounty from one o' the relatives if'n yer interested.  Do ye be takin' the job?\"`n`n");
output("It almost crosses your mind to wonder why Dag would be offering this to you, but the caves aren't that far away after all.");
output("It shouldn't be any problem to search them.");
addnav("Take the Job","runmodule.php?module=dagminotaur&op=take");
addnav("Refuse","runmodule.php?module=dagminotaur&op=nottake");
// Necessary! If this wasn't there then you would get presented
// with a quest you might not want to do and miss other ones.
$args['questoffer']=1;
}
break;
}
return $args;
}

function 
dagminotaur_runevent($type) {
}

function 
dagminotaur_run(){
global $session;
$op httpget('op');

switch($op){
case "take":
$iname getsetting("innname"LOCATION_INN);
page_header($iname);
rawoutput("<span style='color: #9900FF'>");
output_notl("`c`b");
output($iname);
output_notl("`b`c");
output("`3Dag nods, and gives you directions to the rough area the beast has been seen in, as well as a description of a bull-headed humanoid, tough and strong.");
output("You leave the table, ready to seek out the beast.");
// In progress.
set_module_pref("status",1);
addnav("I?Return to the Inn","inn.php");
break;
case "nottake":
$iname getsetting("innname"LOCATION_INN);
page_header($iname);
rawoutput("<span style='color: #9900FF'>");
output_notl("`c`b");
output($iname);
output_notl("`b`c");
output("`3Dag nods, spits to one side and turns away, disgusted with your cowardice.");
// Failed through choice
set_module_pref("status",4);
addnav("I?Return to the Inn","inn.php");
break;
case "search":
page_header("The Caves");
if (!$session['user']['turns']) {
// coping with having the link appear at all times.
output("`2You feel far too tired to hike to the caves today.");
output("Maybe tomorrow.`n`n");
villagenav();
page_footer();
}
output("`2You hike up to the area riddled with caves, and start to check them out individually for traces of the beast.`n`n");
$session['user']['turns']--;
$rand=e_rand(1,10);
switch($rand){// various things they can find.
case 1:
case 2:
output("You search through the caves for a while, finding nothing but bleached bones and dust.");
output("Dispirited after a few hours, you trudge back to the town and look for something else to do.");
villagenav();
break;
case 3:
case 4:
output("You wander through the caves for a while, eventually hearing some cries for help from a distance.");
output("You rush over, and find an injured traveller who had been attempting to travel across the countryside.");
output("Spikes protude from his chest, and he is obviously mortally wounded - you do your best, but he dies after choking something about an attack from a powerful monster.");
output("You hurry back to town, watching your back for whatever attacked the traveller.");
villagenav();
break;
case 5:
output("You wander through the caves for a while, finding that tracking something across rock is extremely difficult.");
output("While looking in vain through an empty cave, you discover intricate patterns carved into the rock!");
output("However, you're more interested in the gem embedded in the rock, and you pry it out as a souvenir before returning to town.");
debuglog("gained a gem from an ancient cave");
$session['user']['gems']++;
villagenav();
break;
case 6:
output("You wander through the caves for a while before hearing a roar from the top of a nearby outcropping!");
output("A mountain lion has spotted you, and bounds towards you, snarling.");
output("You have nowhere to run to, so you ready your %s`2 to fight!",$session['user']['weapon']);
addnav("Fight the Lion",
"runmodule.php?module=dagminotaur&fight=lionfight");
break;
case 7:// bingo!
case 8:
case 9:
case 10:
output("You wander through the caves for a while before finding a trail of blood from a dropped backpack.");
output("You rush following the trail across the rocks to a sandy outcrop where you can see the minotaur, gorging on the body of the dead traveller in front of a small cave.");
output("The beast sniffs the air, and you know you have been detected - you draw your %s`2 and charge down as the beast prepares with its club, snarling all the while.",$session['user']['weapon']);
addnav("Fight the Minotaur","runmodule.php?module=dagminotaur&fight=minotaurfight");
break;
}
break;
}
// handle fights separately - you can't use op because the fight
// script uses that.
$fight=httpget("fight");
switch($fight){
case "lionfight":
// Set stats, but only at the start of the fight.
$badguy = array(
"creaturename"=>translate_inline("Lion"),
"creaturelevel"=>$session['user']['level']-1,
"creatureweapon"=>translate_inline("Savage Claws"),
"creatureattack"=>$session['user']['attack'],
"creaturedefense"=>round($session['user']['defense']*0.80),
"creaturehealth"=>round($session['user']['maxhitpoints']*0.90), 
"diddamage"=>0,
"type"=>"quest"
);
$session['user']['badguy']=createstring($badguy);
$battle=true;
// Drop through
case "lionfighting":
page_header("The Caves");
require_once("lib/fightnav.php");
include("battle.php");
if ($victory) {
// not the main quest, put them back in the village.
output("`2The lion collapses on the ground, bleeding from its wounds.");
if ($session['user']['hitpoints'] <= 0) {
output("`n`n`^Your staunch your own wounds with a bit of moss growing nearby, stopping your bloodloss before you are completely dead.`n");
$session['user']['hitpoints'] = 1;
}
output("`2You quickly flee the scene, hoping that there are not more of them around.`n`n");
$expgain=round($session['user']['experience']*(e_rand(2,4)*0.002));
$session['user']['experience']+=$expgain;
output("`&You gain %s experience from this fight!",$expgain);
output("`2You return to town, shaken by your experience.");
villagenav();
} elseif ($defeat) {
// not the main quest, they get to keep trying.
output("`2Your vision blacks out as the lion tears the throat out of your already badly injured body.`n`n");
output("`%You have died!");
output("You lose 10% of your experience, and your gold is stolen by scavengers!");
output("Your soul drifts to the shades.");
debuglog("was killed by a lion and lost ".
$session['user']['gold']." gold.");
$session['user']['gold']=0;
$session['user']['experience']*=0.9;
$session['user']['alive'] = false;
addnews("%s was slain by a Lion in the Caves!",
$session['user']['name']);
addnav("Return to the News","news.php");
} else {
fightnav(true,true,
"runmodule.php?module=dagminotaur&fight=lionfighting");
}
break;
case "minotaurfight":
// main creature stats, make sure it isn't too easy.
$badguy = array(
"creaturename"=>translate_inline("Minotaur"),
"creaturelevel"=>$session['user']['level']+1,
"creatureweapon"=>translate_inline("Bone Club"),
"creatureattack"=>round($session['user']['attack']*1.150),
"creaturedefense"=>round($session['user']['defense']*0.90),
"creaturehealth"=>round($session['user']['maxhitpoints']*1.20), 
"diddamage"=>0,
"type"=>"quest"
);
$session['user']['badguy']=createstring($badguy);
$battle=true;
// drop through
case "minotaurfighting":
page_header("The Caves");
require_once("lib/fightnav.php");
include("battle.php");
if ($victory) {
// they've won the quest..... but the reward isn't here!
// Set the reward flag!
output("`2The minotaur collapses to the ground with a thud, sending up a cloud of dust!");
output("You have avenged the deaths of many travellers!`n`n");
$expgain=round($session['user']['experience']*(get_module_setting("experience")-1), 0);
$session['user']['experience']+=$expgain;
output("`&You gain %s experience from this fight!`n`n",$expgain);
output("`2You lop off the beast's head, and stash the gruesome thing in your backpack.");
// Reward flag
set_module_pref("status",5);
addnews("%s defeated a Minotaur in the Caves! The deaths of many travellers have been avenged!",$session['user']['name']);
villagenav();
if ($session['user']['hitpoints'] <= 0) {
output("`n`n`^In one corner of the cave, amid the bones of a corpse, you spy the distinctive bottle of a healer's potion.");
output("Grabbing for it as your vision dims, you see that a mere drop remains in the bottom.");
output("Quickly, you drink it any way, hoping it will be enough.");
$session['user']['hitpoints'] = 1;
}
} elseif ($defeat) {
// Failed against the quest creature... 
output("`2Your vision blacks out as the minotaur clubs you to the ground.");
output("You have failed your task to avenge the travellers!`n`n");
output("`%You have died!`n");
output("You lose 10% of your experience, and your gold is stolen by the minotaur!`n");
output("Your soul drifts to the shades.");
debuglog("was killed by a minotaur in the Caves and lost ".
$session['user']['gold']." gold.");
$session['user']['gold']=0;
$session['user']['experience']*=0.9;
$session['user']['alive'] = false;
// They fail it!
set_module_pref("status",3);
addnews("%s was slain by a Minotaur in the Caves!",
$session['user']['name']);
addnav("Return to the News","news.php");
require_once("modules/dagquests.php");
dagquests_alterrep(-1);
} else {
fightnav(true,true,
"runmodule.php?module=dagminotaur&fight=minotaurfighting");
}
break;
}
page_footer();
}
?>

Logged
Never judge a cow by its udder.

Sasuke X

  • Guest
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #4 on: October 11, 2006, 11:56:46 PM »

I kinda get it. On one part you put possible outcomes, the HP and things like those. Basically everything that can happen including the rewards....  :o
Logged

SinHarvest

  • Guest
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #5 on: October 12, 2006, 01:57:22 AM »

I kinda get it. On one part you put possible outcomes, the HP and things like those. Basically everything that can happen including the rewards....  :o
Yes, this is quite easy to understand.....hmmmm, maybe I can help you out Sasuke
Logged

LeafToad

  • Guest
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #6 on: October 12, 2006, 02:03:37 AM »

Coding seems, understandable, yet time consuming.
Logged

SinHarvest

  • Guest
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #7 on: October 12, 2006, 02:05:57 AM »

Coding seems, understandable, yet time consuming.
Oh yea, I'm doing one now.(a search and kill mission) and I am going bonkers over the time it takes
Logged

LeafToad

  • Guest
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #8 on: October 12, 2006, 02:08:36 AM »

Once I read the whole thing, I will attempt to make one to help you guys out.. It will be a mission for Academy Students. :twisted:
Logged

Sasuke X

  • Guest
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #9 on: October 12, 2006, 10:45:13 PM »

Yeah, it's kinda understandable. The only thing i don't understand though is you know those little code things at the left side (}

function dagminotaur_runevent($type) {
}

function dagminotaur_run(){
   global $session;
   $op = httpget('op');
   
   switch($op){
   case "take":
      $iname = getsetting) :twisted: and the end. I would have to have a key to what they are and what they do... also, what kind of program would i use to code something?
Wait leaftoad, only Genin and + can do missions. Academy Students haven't graduated :D. Neji it also seems I have some people to help me code stuff  :D
« Last Edit: October 13, 2006, 12:01:02 AM by Sasuke X »
Logged

SoraHyuga

  • Guest
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #10 on: October 13, 2006, 12:59:28 AM »

wow:shock:...very time-consuming....all that for one event...but here r some ideas...chores for a villager, assasination missions, being a ambassador, saving a country from a certain danger, and protecting a princess
Logged

Neji

  • Administrator
  • Hero Member
  • *****
  • Karma: +459/-86
  • Offline Offline
  • Posts: 7113
    • View Profile
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #11 on: October 13, 2006, 01:54:23 AM »

Yeah, it's kinda understandable. The only thing i don't understand though is you know those little code things at the left side (}

function dagminotaur_runevent($type) {
}

function dagminotaur_run(){
   global $session;
   $op = httpget('op');
   
   switch($op){
   case "take":
      $iname = getsetting) :twisted: and the end. I would have to have a key to what they are and what they do... also, what kind of program would i use to code something?
Wait leaftoad, only Genin and + can do missions. Academy Students haven't graduated :D. Neji it also seems I have some people to help me code stuff  :D

http://wiki.dragonprime.net

check it out, search for "example module"

I cannot possibly tell you everything ;) this takes time.
Logged
Never judge a cow by its udder.

Sasuke X

  • Guest
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #12 on: October 14, 2006, 05:21:33 AM »

So, if we get all the coding done, this could actually happen? (after you approved of the missions) :twisted:
Logged

LeafToad

  • Guest
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #13 on: October 16, 2006, 05:01:06 AM »

Wait leaftoad, only Genin and + can do missions. Academy Students haven't graduated :D. Neji it also seems I have some people to help me code stuff  :D

My plans have been thwarted.  :evil: 
I guess a good job for a Genin would be to protect a carriage of ramen going to Ichiraku's ramen, I'll try to code this, but I'm putting it out there so you can just incase I mess up. Also I am just wondering but would the accomplished/failed missions show up in your bio and would you get some kind of reward for finishing it or something?
Logged

klaymank

  • Hero Member
  • *****
  • Karma: +104/-132
  • Offline Offline
  • Posts: 3986
  • RUN PAC MAN RUN!!!!!!!!!!!!!!!!!!!!!!!
    • View Profile
Re: What would you like as a mission for your home country?(fire,water etc.)
« Reply #14 on: October 16, 2006, 05:04:07 AM »

*Gives leaftoad a waffle*Dont worry make one for genin
Logged
I'm like the Doctor. I'm always bouncing around time and space.
Pages: [1] 2
 

Page created in 0.059 seconds with 16 queries.