Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 19.01.2006, 13:09   #1
SolarWind
Архивный участник
 
Join Date: Nov 2005
Posts: 7
Default CacheD C1

I can't decrase quantity of user items through 2009 port of CashD (C1).
Somebody help me with "DelItem"=>"13;charName;warehouse;itemId;itemAmoun t"

12\t
4\t
5\t
working, but not 13\t

What's wrong?

some cut of code..
Code:
function cached($command){
global $cached_ip,$cached_port;
  $fp=fsockopen("127.0.0.1", 2009, $errno, $errstr);
  if(!$fp)return 0;
  else{
    fwrite($fp, $command);
    stream_set_timeout($fp, 2);
    $answ=fgets($fp,8);
    return "$answ";
  }
}

function delete_item($char_name,$item_id,$amount){
global $cached_errors;
  kick_char($char_name);
  $command="13\t$char_name\t0\t$item_id\t$amount\t\n";
  $answ=cached($command);
  if($answ==="1")return "...";
  else return "<font color=red>Error:</font><font color=red>$cached_errors[$answ]</font>...";
}

...

      echo "<form method=post action='solarwind_cached_cmd.php'>";
      echo "Char name<input type='text' name='char_name'> ";
      echo "Amount<input type='text' name='amount'> ";
      echo "<input type='submit' value='...'>";
      echo "</form>";
      if ( isset( $_REQUEST['char_name'] ) and isset( $_REQUEST['amount'] ) ){
      	 $char_name = trim($_REQUEST['char_name']);
	 $amount = intval($_REQUEST['amount']);
	 $result = delete_item($char_name,57,$amount);
	 echo "
".$result;
	 log_it("[...]: $result",$ip);
      }
russian replaced...

10x 2 darkagent 4:
Code:
"AddItem"=>"12;charName;warehouse;itemType;itemAmount;enchant;eroded;bless;ident;wished",
"AddSkill"=>"6;charName;skillid;skilllevel", 
"BanCharacter"=>"39;charName;banHour", 
"ChangeCharacterName"=>"4;oldCharName;newCharName", 
"ChangePledgeLevel"=>"46;pledgeName;pledgeLevel", 
"ChangePledgeOwner"=>"37;pledgeName;newOwnerName", 
"CopyCharacter"=>"43;srcCharName;newCharName;destAccountId", 
"CreatePet"=>"44;charName;petCollarClassId;npcClassId;exp;level;hp;mp;meal", 
"CreatePledge"=>"47;pledgeName;ownerCharName", 
"DelBookmark"=>"24;charId;bookmarkName", 
"DeleteCharacter"=>"34;charName", 
"DeleteComment"=>"33;commentId;option", 
"DeletePledge"=>"38;pledgeName", 
"DelItem"=>"13;charName;warehouse;itemId;itemAmount",
"DelItem2"=>"54;itemId", 
"DelPledgeCrest"=>"25;pledgeName", 
"DelQuest"=>"11;charName;questId", 
"DelSkill"=>"7;charName;skillId", 
"DisableCharacter"=>"20;charName;option", 
"EnableCharacter"=>"21;charName;accountId", 
"KickCharacter"=>"5;charName", 
"ManageAnnounce"=>"50;action;announceId;announceMsg", 
"ManageIntervalAnnounce"=>"51;action;interval;announceId;announceMsg", 
"ModifyCharacter"=>"15;charName;newSp;newExp;newAlign;newPk;newPkPardon;newDuel", 
"ModifyCharacter2"=>"16;charName;newGender;newRace;newClass;newFace;newHairShape;newHairColor", 
"ModifyCharacterDelta"=>"29;charName;deltaSp;deltaExp;deltaAlign;deltaPk;deltaPkPardon;deltaDuel", 
"ModifyCharacterPledge"=>"17;charName;nickName", 
"ModifyItem"=>"14;charName;warehouse;itemId;newItemType;newItemAmount;newEnchant;newEroded;newBless;newIdent;newWished", 
"ModifyPledgeName"=>"26;pledgeName;newPledgeName", 
"ModifySkill"=>"8;charName;skillId;newSkillLevel", 
"ModifyWeeklyPlay"=>"52;charName;type;minute", 
"MoveCharacter"=>"31;charName;newAccountId;newAccountName", 
"MoveItem"=>"30;charName;warehouse;itemId;receiverCharId;receiverWareHouse", 
"MoveItem2"=>"40;charName;itemId;receiverCharId;receiverWareHouse", 
"OustPledge"=>"36;charName", 
"PunishCharacter"=>"18;charName;punishId;remainTime", 
"RestoreCharacter"=>"35;charId;accountId;accountName", 
"RestoreCharacter2"=>"49;charId;newCharName;accountId;accountName", 
"SeizeFreeItem"=>"53;2;itemId", 
"SeizeItem"=>"53;1;itemId", 
"SeizeItem2"=>"28;option;charName;warehouse;itemId", 
"SendHome"=>"45;charName", 
"SetBookmark"=>"23;charId;bookmarkName;worldId;xLoc;yLoc;zLoc", 
"SetBuilderAccount"=>"19;accountName;builderLevel", 
"SetBuilderCharacter"=>"3;charName;builderLevel", 
"SetCharacterLocation"=>"2;charName;worldId;xLoc;yLoc;zLoc", 
"SetOneTimeQuest"=>"9;charName;questId;questState", 
"SetProhibited"=>"27;option;charName", 
"SetQuest"=>"10;charName;questId;questState", 
"SetSkillAll"=>"48;charName", 
"WriteComment"=>"32;charName;comment;writer"
SolarWind is offline  
Old 19.01.2006, 16:01   #2
SolarWind
Архивный участник
 
Join Date: Nov 2005
Posts: 7
Default Re: CacheD C1

darkagent 10x again
"DelItem"=>"13;charName;warehouse;itemId;itemAmoun t"
itemId <> type_id

that's uniq item id in user_item
SolarWind is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:17.