Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Dekaron > Dekaron Private Server
You last visited: Today at 10:55

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Question]Adding Dils via POST

Discussion on [Question]Adding Dils via POST within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old   #1
 
gedimazs's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
[Question]Adding Dils via POST

Hi all,

Wanted to ask how to send dils via post. You know the web script when we admins can send items via post, so wanted to ask how to send dils via post, cause when you open letter you can see ammount of dils. It is showing 0. So what the index of dils?
Thx for answering
gedimazs is offline  
Old 06/27/2009, 03:48   #2
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
download the php control panel in my signature
thats the way to do it
janvier123 is offline  
Old 06/27/2009, 08:51   #3
 
gedimazs's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
Quote:
Originally Posted by janvier123 View Post
download the php control panel in my signature
thats the way to do it
There are no such adding DILS not coins via POST. I know I have one script but player must be disconected from the server if I want to send DILS. But I want to send DILS not disconnecting people from the game.
gedimazs is offline  
Old 06/27/2009, 09:44   #4
 
Zombe's Avatar
 
elite*gold: 20
Join Date: Dec 2007
Posts: 1,451
Received Thanks: 840
Get dill from a chest and then trade them? Or spawn a chest near them? Lol...
Zombe is offline  
Old 06/27/2009, 10:47   #5
 
gedimazs's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
Quote:
Originally Posted by Zombe View Post
Get dill from a chest and then trade them? Or spawn a chest near them? Lol...
That way is known for ages Ok I see no1 knows how to send DILS via POST.
Ok so then pls close the thread
gedimazs is offline  
Old 06/27/2009, 13:47   #6
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
trade them o_O ?
janvier123 is offline  
Old 06/29/2009, 04:20   #7
 
elite*gold: 0
Join Date: Feb 2008
Posts: 185
Received Thanks: 57
I'm currently writing a php page to send any item via index number through the post. I will also have the option to send dils.

So if you can wait a few days, I should have it posted.

Otherwise you have to do it manually in the db with the user_postbox table. I can help with that if needed but the script should be out in a few days.


Once I get that done, I'm going to mess around with a script to turn a scroll in the inventory to a piece of armor or weapon that has options like slots or noble or divine. I'm not anticipating that one to be easy but I'm going to try anyways.
caper is offline  
Thanks
2 Users
Old 06/29/2009, 10:44   #8
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
money.php
Code:
<?php

require_once "config.inc.php";


if(isset($_SESSION[step2]) && isset($_POST[step2])) {
    //注册的最后一步
    $errorStr = formStep3();
    if($errorStr!=null){
        require_once('money.html');
    }else{
        $success="成功给帐号:$_POST[user_name]加入游戏币$_POST[money]DIL";
		require_once('success.html');
		unset($_SESSION[step2], $_SESSION[step1]);
    }}
else {
    //注册的第二步
    require_once('money.html');
    $_SESSION[step2] = 1;	}
	

function formStep3(){
    $errors = array();
    $errorStr = null;
	
//查询用户名是否存在
	$strSql1="select * from character.dbo.user_character where character_name='$_POST[user_name]'";
    $character_odbc = odbc_connect('account','DBUSER','DBPASS'); 
    $character_result=odbc_do($character_odbc,$strSql1);
    odbc_fetch_row($character_result);
	$character_no=odbc_result($character_result,1);
	odbc_close($character_odbc);
    if ( $character_no== null)  $errors[] = "无此玩家!";
	
    if (strlen($_POST[money])<1) $errors[]="请输入增加的游戏币数";
	
    if(!preg_match("/^[0-9]{1,12}$/i",$_POST[money])) $errors[]="游戏币只能为数字,最少为1位";
    if(sizeof($errors)>0){
       $errorStr .= "<br><font>";
       $errorStr .= "信息输入错误:";
       foreach($errors as $error)
               $errorStr .= "<li>$error</li>";
       $errorStr .= "</font><br><br>";
    }else{

    $money_query="update character.dbo.user_character set dwMoney=dwMoney+$_POST[money] where character_no='$character_no'";
    $dk_money_odbc = odbc_connect('account','DBUSER','PASS'); 
    $dk_money_result=odbc_do($dk_money_odbc,$money_query);
	odbc_close($dk_money_odbc);
    }
    return $errorStr;

}

?>
config.inc.php
Code:
<?php

//开始session
session_start();

//设置不进行本地缓存
header('Expires: '.date('D,d M Y H:i:s',mktime(0,0,0,1,1,2000)).' GMT');
header('Last-Modified:'.gmdate('D,d M Y H:i:s').' GMT');
header('Cache-control: private, no-cache,must-revalidate');
header('Pragma: no-cache');



?>
money.html
Code:
<strong><font size="2">修改游戏币</font></strong><br>
<form method="post" action="money.php">
<?=$errorStr ?>
<input type="hidden" name="step2" value="1">
玩家角色名:
<input type="text" name="user_name" value="">
<br>
游戏币数额:
<input type="text" name="money" value="">
<br>
<br>
<input type="submit" name="Submit4" value="提交">
</form>
success.html
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>sucess...</title>
</head>

<body>
<h1>sucess</h1>
</body>

</html>
janvier123 is offline  
Old 06/29/2009, 14:14   #9
 
gedimazs's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
Quote:
Originally Posted by janvier123 View Post
money.php
Code:
<?php

require_once "config.inc.php";


if(isset($_SESSION[step2]) && isset($_POST[step2])) {
    //注册的最后一步
    $errorStr = formStep3();
    if($errorStr!=null){
        require_once('money.html');
    }else{
        $success="成功给帐号:$_POST[user_name]加入游戏币$_POST[money]DIL";
		require_once('success.html');
		unset($_SESSION[step2], $_SESSION[step1]);
    }}
else {
    //注册的第二步
    require_once('money.html');
    $_SESSION[step2] = 1;	}
	

function formStep3(){
    $errors = array();
    $errorStr = null;
	
//查询用户名是否存在
	$strSql1="select * from character.dbo.user_character where character_name='$_POST[user_name]'";
    $character_odbc = odbc_connect('account','DBUSER','DBPASS'); 
    $character_result=odbc_do($character_odbc,$strSql1);
    odbc_fetch_row($character_result);
	$character_no=odbc_result($character_result,1);
	odbc_close($character_odbc);
    if ( $character_no== null)  $errors[] = "无此玩家!";
	
    if (strlen($_POST[money])<1) $errors[]="请输入增加的游戏币数";
	
    if(!preg_match("/^[0-9]{1,12}$/i",$_POST[money])) $errors[]="游戏币只能为数字,最少为1位";
    if(sizeof($errors)>0){
       $errorStr .= "<br><font>";
       $errorStr .= "信息输入错误:";
       foreach($errors as $error)
               $errorStr .= "<li>$error</li>";
       $errorStr .= "</font><br><br>";
    }else{

    $money_query="update character.dbo.user_character set dwMoney=dwMoney+$_POST[money] where character_no='$character_no'";
    $dk_money_odbc = odbc_connect('account','DBUSER','PASS'); 
    $dk_money_result=odbc_do($dk_money_odbc,$money_query);
	odbc_close($dk_money_odbc);
    }
    return $errorStr;

}

?>
It is nice that you copied the script that I was talking about that I have, but to send dils with that script player must be disconnected from the server. I don't need it. I want send DILS via POST
gedimazs is offline  
Old 06/29/2009, 14:23   #10
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
i got a other script that can do that wihout the player need to be offline
its in my sig
janvier123 is offline  
Old 06/29/2009, 15:19   #11
 
gedimazs's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
Quote:
Originally Posted by janvier123 View Post
i got a other script that can do that wihout the player need to be offline
its in my sig
wich one? if you are talking about Name: Remote Admin PHP Panel so there is no download link. But I think I have it and there is no such script to add DILS (not coins) via POST when player is online.
gedimazs is offline  
Thanks
1 User
Old 06/29/2009, 17:58   #12
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
thx for telling me
ill put the link back


janvier123 is offline  
Old 06/29/2009, 20:24   #13
 
gedimazs's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
Quote:
Originally Posted by janvier123 View Post
thx for telling me
ill put the link back


I was right. There is no script for adding DILS via MAIL.
gedimazs is offline  
Old 06/29/2009, 20:28   #14
 
elite*gold: 0
Join Date: Feb 2008
Posts: 185
Received Thanks: 57
I'm at work so I can't post it but I got mine working. It uses the stored procedure for sending mail to a player and can send items by index number and dils at the same time to a mailbox. No need to be offline to use it.

Basically if you can work with PHP, you can modify the armor or weapon form in that control panel by adding a dil field and then use this line (may need a tweak or two)

Code:
mssql_query("EXEC character.dbo.SP_POST_SEND_OP '".$_POST['char_no']."','".$gm."',1,'".$text1."','".$text2."','".$_POST['item']."','".$_POST

['dil']."',0",$ms_con);
Otherwise I'll send you a link later.
caper is offline  
Thanks
1 User
Old 06/29/2009, 20:43   #15
 
gedimazs's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
Quote:
Originally Posted by caper View Post
I'm at work so I can't post it but I got mine working. It uses the stored procedure for sending mail to a player and can send items by index number and dils at the same time to a mailbox. No need to be offline to use it.

Basically if you can work with PHP, you can modify the armor or weapon form in that control panel by adding a dil field and then use this line (may need a tweak or two)

Code:
mssql_query("EXEC character.dbo.SP_POST_SEND_OP '".$_POST['char_no']."','".$gm."',1,'".$text1."','".$text2."','".$_POST['item']."','".$_POST

['dil']."',0",$ms_con);
Otherwise I'll send you a link later.
I think I'll wait for your link. Cause I'm not so good with PHP
gedimazs is offline  
Reply


Similar Threads Similar Threads
several question and maybe adding later
08/08/2010 - Private Server - 0 Replies
1) is athens luna and celestia luna both dead? 2) which private server of perfect world have latest mermaid character? thats all for now.......
[Question]Adding Pets
07/15/2010 - EO PServer Hosting - 2 Replies
when always i add new pets i get same proplem which is dissapearing the pet + dissapering the egg :confused: what i want to know for examble this in thread" New 2 Pets i 've make the sql with nothing wrong but what i want to know is if i must change any of the cilent side files ? or puts any thing new ??
{QUESTION} Adding sit to F1-F10
12/28/2009 - Conquer Online 2 - 3 Replies
is there anyway to do this
[Question] adding yourself to party
09/02/2008 - Silkroad Online - 8 Replies
is it posible cos it heppened to me when my friend leveled me up and he was on bot so he couldnt add him how can it be? :confused: p.s it was only me and him in party



All times are GMT +1. The time now is 10:56.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.