Jump to content

Sunzuke

Members
  • Posts

    76
  • Joined

  • Last visited

Posts posted by Sunzuke

  1. dass man sich bei der schrift überhaupt noch über artikel aufregt xD

     

    nur so nebenbei, ich ahne ja sowieso schon chaos, aber, falls die script vom Posted 03 October 2013 - 04:26 PM zzt. überhaupt noch relevant ist:

    statt

    for(set .@i,1; .@i <= .@nb; set .@i,.@i+1)
    mes "Acc ID: "+.@account_id$[.@i]+" Anzahl v4p "+.@anzahlid$[.@i];
    

    sollte es heissen

    for(set .@i,0; .@i < .@nb; set .@i,.@i+1)
    mes "Acc ID: "+.@account_id$[.@i]+" Anzahl v4p "+.@anzahlid$[.@i];
    

    da arrays mit dem index 0, nicht 1, beginnen

  2. $sql_ip = "".$_SERVER['SERVER_ADDR']."";
    $sql_user = "ragnarok";
    $sql_pass = "ragnarok";
    $sql_db = array(
    'ragnarok'
    );
    
    //Warning: Be sure not to use POST variables inside the query because of SQL Injection
    $itemid = 4363;
    $string = "WHERE `nameid` LIKE '".$itemid."' OR `card0` LIKE '".$itemid."' OR `card1` LIKE '".$itemid."' OR `card2` LIKE '".$itemid."' OR `card3` LIKE '".$itemid."'";
    $sql = mysql_connect($sql_ip, $sql_user, $sql_pass);
    if(!$sql) die("Failed to connect to $sql_ip SQL Server.<br>");
    $query = mysql_query("SHOW DATABASES");
    $dbss = array();
    $db = array();
    while($row = mysql_fetch_array($query)) $dbss[] = "".$row[0]."";
    foreach($sql_db as $dbs) {
    	if(!in_array($dbs, $dbss)) die("Database $dbs has not been found on the server.<br>");
    	$query = mysql_query("SHOW TABLES FROM `$dbs`");
    	while($row = mysql_fetch_array($query)) $db[$row[0]] = $dbs;
    }
    heres the script for the amount of items ingame
    
    $amt = 0;
    $query = mysql_query("SELECT * FROM ".$db['inventory'].".`inventory` ".$string."");
    while ($row = mysql_fetch_object($query)) {$amt += $row->amount;}
    $query = mysql_query("SELECT * FROM ".$db['cart_inventory'].".`cart_inventory` ".$string."");
    while ($row = mysql_fetch_object($query)) {$amt += $row->amount;}
    $query = mysql_query("SELECT * FROM ".$db['storage'].".`storage` ".$string."");
    while ($row = mysql_fetch_object($query)) {$amt += $row->amount;}
    
    echo "Item ID ".$itemid." exists ".$amt." times!";

    heres the script for the amount of player owning the item (not counting the storage)

    $ItemOwner = array();
    $query = mysql_query("SELECT * FROM ".$db['cart_inventory'].".`cart_inventory` ".$string."");
    while ($row = mysql_fetch_object($query)) {
    	if(!in_array($row->char_id, $ItemOwner)) $ItemOwner[] = $row->char_id;
    }
    $query = mysql_query("SELECT * FROM ".$db['inventory'].".`inventory` ".$string."");
    while ($row = mysql_fetch_object($query)) {
        if(!in_array($row->char_id, $ItemOwner)) $ItemOwner[] = $row->char_id;
    }
    
    
    echo "".count($ItemOwner)." Player own Item ID: ".$itemid."";
    • Upvote 1
  3. You could use a variable to save the infos... but..:

    "$"      - A global permanent variable.
               They are stored in database table `mapreg`.
    

    http://svn.code.sf.net/p/rathena/svn/trunk/doc/script_commands.txt

    They use sql too

     

    - - - -

    I don't think rAthena supports asort()arsort()krsort() or ksort()

    You could ask in the src section if someone would add it for you then you could do it like this:

    set $rank[<charid>],<value>;

    and then use arsort() and pick the first 10 entires

  4. Hey.. setting all mobs to lvl 50 seems a bit hard to do manually

    I wrote you a php script to which does it for you

     

     
    it contains a default renewal mob db with max monster lvl 50 too
     
    here's the code found in the rar file:
     
    <?php
    
    $index = str_replace('\\', '/', realpath(dirname(__FILE__)));
    
    $LV = 50;
    
    $original_mob = "ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper";
    $original_mob = explode(',', $original_mob);
    $mob_db = file("".$index."/mob_db.txt");
    foreach($mob_db as $mob) {
    	$mob2 = explode(',', $mob);
    	if(substr($mob, 0, 2) != "//" && count($mob2) == count($original_mob)) {
    		for($i = 0; $i < count($mob2); $i++) $mobs[$original_mob[$i]] = $mob2[$i];
    		$end = 0;
    		foreach($original_mob as $key) {
    			if(strpos(nl2br($mobs[$key]), '<br />') !== false) {
    				$mobs[$key] = "".str_replace('<br />', '', nl2br($mobs[$key]))."";
    				$end = 1;
    			}
    			if(empty($$key)) {
    				echo "".$mobs[$key]."";
    			} else {
    				if($$key < $mobs[$key]) {
    					echo "".$$key."";
    				} else {
    					echo "".$mobs[$key]."";
    				}
    			}
    			if($end == 1) {	echo "<br>";	$end = 0;	} else {	echo ",";	}
    		}
    	} else {
    		echo "$mob<br>";
    	}
    }
    
    ?>
    

     

  5. This line is kinda awkward

    } else if ( getmapguildusers( getcharid(0) ) == getcharid(0) ) {
    

    why should the amount of users on the map match the guild id o.O? there is just one given value too although it's 2 in the doc

    getmapguildusers("<map name>",<guild id>)
    

    ...

     

    I think it should work like this:

    invek,144,175,5	script	WoE Prize	734,{
    
    if ( agitcheck() ) {
    	mes "A war is currently in progress";
    	mes "If your guild owned a castle ask your guild master to see me to claim the reward";
    	close;
    }
    while(.castlename$[set(.@a,.@a+1)]!="")
    	if ( getcastledata( .castlename$[.@a],1 ) == getcharid(2) ) {
    		if ( $castle_claimed[.@a] ) {
    			mes "your guild already received the reward";
    			close;
    		} else {
    			mes "receiving the reward for "+ .castlename$[.@a];
    			getitem 12035,1; // some mathematics ...
    			set $castle_claimed[.@a],1;
    			close;
    		}
    	}
    mes "Your guild failed to take reward";
    mes "if your guild owned a castle your can claim the reward from me";
    close;
     
    OnAgitEnd:
    	deletearray $castle_claimed[0], 128; // everytime woe ends the variable resets
    	end;
     
    OnInit:
    	setarray .castlename$[1], "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05", "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05", "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05", "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05", "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05";
    	waitingroom "WOE Prize Giver",0;
    	end;
    } 

    I think this script is buggy when you have two castles, too. it will only give you the reward for one

     

     

    btw: nice music taste <3

  6. I don't know how to get the monstres position besides patskies script but you could use the players position

    OnNPCKillEvent:
    	if(killedrid == <monster id>) {
    		attachrid(killerrid);
    		if(getmapxy(@mapname$,@mapx,@mapy,0,"""+strcharinfo(0)+"")!=0) end;
    		set @mapx,@mapx+rand(-15,15);
    		if(@mapx < 0) set @mapx,0;
    		set @mapy,@mapy+rand(-15,15);
    		if(@mapy < 0) set @mapy,0;
    		makeitem "<item name>",<amount>,""+@mapname$+"",@mapx,@mapy;
    	}
    end; 

    (not tested)

     

     

  7.  ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper

     

    3000,PORING,Poring,Poring,30,300,0,160,80,1,20,60,0,5,30,50,1,0,15,40,10,12,1,3,21,0x83,400,1872,672,480,0,0,0,0,0,0,501,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

    du hast halt alle drops auf 0 gesetzt / deaktiviert.

     

     

    ich hab mirn kurzes php script geschrieben um zu gucken ob die kommata richtig gesetzt sind:

    $origmob = "ID,Sprite_Name,kROName,iROName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper";
    $origmob = explode(',', $origmob);
    $mob = "3000,PORING,Poring,Poring,30,300,0,160,80,1,20,60,0,5,30,50,1,0,15,40,10,12,1,3,21,0x83,400,1872,672,480,0,0,0,0,0,0,501,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
    $mob = explode(',', $mob);
    for($i=0; $i < count($mob); $i++) echo "".$origmob[$i].": ".$mob[$i]."<br>";

    das resultat war:

    ID: 3000

    Sprite_Name: PORING

    kROName: Poring

    iROName: Poring

    LV: 30

    HP: 300

    SP: 0

    EXP: 160

    JEXP: 80

    Range1: 1

    ATK1: 20

    ATK2: 60

    DEF: 0

    MDEF: 5

    STR: 30

    AGI: 50

    VIT: 1

    INT: 0

    DEX: 15

    LUK: 40

    Range2: 10

    Range3: 12

    Scale: 1

    Race: 3

    Element: 21

    Mode: 0x83

    Speed: 400

    aDelay: 1872

    aMotion: 672

    dMotion: 480

    MEXP: 0

    MVP1id: 0

    MVP1per: 0

    MVP2id: 0

    MVP2per: 0

    MVP3id: 0

    MVP3per: 501

    Drop1id: 10

    Drop1per: 0

    Drop2id: 0

    Drop2per: 0

    Drop3id: 0

    Drop3per: 0

    Drop4id: 0

    Drop4per: 0

    Drop5id: 0

    Drop5per: 0

    Drop6id: 0

    Drop6per: 0

    Drop7id: 0

    Drop7per: 0

    Drop8id: 0

    Drop8per: 0

    Drop9id: 0

    Drop9per: 0

    DropCardid: 0

    DropCardper: 0

    • Upvote 1
  8. 
    

    <script>

    function reload(target, site) {

    var ajaxRequest;

    try { ajaxRequest = new XMLHttpRequest(); }

    catch (e) {

    try {

    ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

    }

    catch (e) {

    try { ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); }

    catch (e) {

    alert("Your browser broke!");

    return false;

    }

    }

    }

    ajaxRequest.onreadystatechange = function() {

    if(ajaxRequest.readyState == 4) {

    var ajaxDisplay = document.getElementById(""+target+"");

    ajaxDisplay.innerHTML = ajaxRequest.responseText;

    }

    }

    ajaxRequest.open("GET", "/"+site+"/", true);

    ajaxRequest.send(null);

    }

    </script>

  9. I think it's because your timezone is before the servers timezone so your edit makes the root think the file is edited in the future

     

    you may fix this problem by running the command:

    touch /root/Destop/trunk/src/*

  10. Hey. Ich erfülle zwar alle punkte, habe aber kein Team.

     

    Ich würde gerne den Website-part übernehmen. Falls dieser Teil in einem Team fehlt stehe ich also gerne bereit.

    (Falls ihr das wollt würde ich mich dennoch freuen, wenn es einen Designer gäbe, da ich kreativ schwach bin :)

     

    Mein gewünschtes Projekt ist ein LoL-Ripoff, dies habe ich allerdings schon aufgegeben (fehlendes Team), also bin ich offen für alles.

  11. I think the query should look like this:

    query_sql "UPDATE `cp_credits` SET `balance` = `balance` + " + @vote + " WHERE `account_id` = " + getcharid(3) + " AND `balance` <> 0;";
    

     

     

     

    someone knows wtf  

     

    AND `balance` <> 0;

    means?

     

    <> is the operator for "not equal", the same as !=

    ahh thanks :D

  12. thanks alot

     

    actually there is no real reason ^^

    I don't think I will ever make an item script to description code so I just thought I'm gonna add the item script like that

    I keept them so It's easier for you to see your item script

     

    example: { skill 8,10; },{ changebase 0; },{ changebase Class; } 

    if i'd remove the curly braces: skill 8,10; changebase 0; changebase Class;

    would be a bit confusing to me ^^

  13. My ro is patched.. I don't know why I dont have them...

    I dont have the following files:

     

    4235#XMASÄíÅ°Ä«µå#
    4342#RSX0806Ä«µå#
    4480#ºÀÀεÈÅ°¿¤_D_01Ä«µå#
    4486#ºÀÀεȺ£¸£Á¦ºêºêÄ«µå#
    4487#ºÀÀεÈÀÌÇÁ¸®Æ®Ä«µå#
    4488#ºÀÀεȴÙÅ©·ÎµåÄ«µå#
    4489#ºÀÀεÈÆĶó¿ÀÄ«µå#
    4490#ºÀÀεȿù¾ßÈ­Ä«µå#
    4491#ºÀÀεȽº³ªÀÌÆÛÄ«µå#
    4492#ºÀÀεȿÀÅ©È÷¾î·ÎÄ«µå#
    4493#ºÀÀεÈŸ¿À±ºÄ«Ä«µå#
    4496#ºÀÀεȵ巹ÀÌÅ©Ä«µå#

     

    can someone give me them? ._.

    wooops wrong section -> please move: http://rathena.org/board/forum/41-graphics-requests/ sorry :/

  14. Hi ^^

     

    I want Soul Breaker to be castable without selecting an enemy (like storm gust or other aoe spells)

    and I want it to deal damage on everyone who is in the cast range.

     

    I hope you guys can help me with it *-*

     

    Thanks alot :D

     

    - - - -

    "if you want to implement more complex skills, there's a lot more to it. A seperate section will be created in the future for this."
    http://rathena.org/wiki/Adding_new_skills

    is this already done? where? I'd like to read about moveing skills (knock-back / body relocation)

×
×
  • Create New...