|
You last visited: Today at 23:16
Advertisement
Vsro Files - Max Cap, NPC Edit, Items
Discussion on Vsro Files - Max Cap, NPC Edit, Items within the SRO Private Server forum part of the Silkroad Online category.
10/02/2011, 17:24
|
#16
|
Chat Killer In Duty
elite*gold: 5
Join Date: May 2008
Posts: 16,397
Received Thanks: 6,509
|
Quote:
Originally Posted by octaviansan
Sorry, im noob.
How do i do that, could u give me the sql command?
|

trigger is a stored procedure that takes action eveytime something happens on a table(s).
ou must specify what you want to happend after/before somethign is done on database
can be delete/update/insert/select
if i recall, i think MSSQL 2055/2008 has a wizard for easy setup triggers
|
|
|
10/02/2011, 17:32
|
#17
|
elite*gold: 10
Join Date: Oct 2008
Posts: 950
Received Thanks: 146
|
So can u look up in the database and make a full tutorial.
I told u, i dont know MSSQL, neither MYSQL.
|
|
|
10/02/2011, 17:35
|
#18
|
Chat Killer In Duty
elite*gold: 5
Join Date: May 2008
Posts: 16,397
Received Thanks: 6,509
|
Quote:
Originally Posted by octaviansan
So can u look up in the database and make a full tutorial.
I told u, i dont know MSSQL, neither MYSQL.
|
when i get my home, imma isntal MSSQL and take a look to db. Maybe there is already a procedure to that, but i need to check
|
|
|
10/02/2011, 17:36
|
#19
|
elite*gold: 10
Join Date: Oct 2008
Posts: 950
Received Thanks: 146
|
Ok, thank you.
Ok, i managed to make the automatic silks script.
Thank to Yoshi, of course.
|
|
|
10/02/2011, 19:58
|
#20
|
elite*gold: 0
Join Date: Nov 2008
Posts: 229
Received Thanks: 25
|
octaviansan can you post your code how you maked silk script
|
|
|
10/02/2011, 20:01
|
#21
|
elite*gold: 10
Join Date: Oct 2008
Posts: 950
Received Thanks: 146
|
Make .php file,
Run this in your webserver:
Code:
<?php
for ($i=1423;$i<5000;$i++){
echo "insert into dbo.SK_Silk (JID,silk_own,silk_gift,silk_point) VALUES (".$i.",40000,0,0);<br>";
}
?>
Then take all the sql queries, paste them into the DB, Execute them.
You're done, every account will have 40k silks.
|
|
|
10/02/2011, 20:07
|
#22
|
Chat Killer In Duty
elite*gold: 5
Join Date: May 2008
Posts: 16,397
Received Thanks: 6,509
|
Quote:
Originally Posted by octaviansan
Make .php file,
Run this in your webserver:
Code:
<?php
for ($i=1423;$i<5000;$i++){
echo "insert into dbo.SK_Silk (JID,silk_own,silk_gift,silk_point) VALUES (".$i.",40000,0,0);<br>";
}
?>
Then take all the sql queries, paste them into the DB, Execute them.
You're done, every account will have 40k silks.
|
ok that seems useful
in fact i can use part of it to make the trigger
that way silks get assigned auto
|
|
|
10/02/2011, 20:14
|
#23
|
elite*gold: 10
Join Date: Oct 2008
Posts: 950
Received Thanks: 146
|
Ok, do that.
Then post here if u want  .
|
|
|
10/02/2011, 21:07
|
#24
|
elite*gold: 0
Join Date: Mar 2009
Posts: 248
Received Thanks: 118
|
Just add it as a stored procedure and execute it with the "UserJID" as parameter in the _AddNewChar procedure.
|
|
|
10/02/2011, 21:20
|
#25
|
Chat Killer In Duty
elite*gold: 5
Join Date: May 2008
Posts: 16,397
Received Thanks: 6,509
|
Quote:
Originally Posted by Vinator
Just add it as a stored procedure and execute it with the "UserJID" as parameter in the _AddNewChar procedure.
|
im gonna make it this way
do it if you want:
Make a trigger that executes when an insert is done
use the UserJID as a reference and do the insert
the only thing to know right now, is if i can insert a duplicated USERJID on silk table
|
|
|
10/02/2011, 21:30
|
#26
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,693
Received Thanks: 3,160
|
guys if you WANT to add silks automatically after user reg do the following
Quote:
<?php
/* Simple registration page for silkroad server, by Chernobyl
* Settings are at _inc/config.php
* If you get an mssql connection error, while defining totally correct data
* Just use older ntwdblib.dll for your webserver
*/
require_once('_inc/security.class.php');
require_once('_inc/config.php');
if(!isset($_POST['submit']))
{
echo "<table border='1'>
<form method='post'>
<td>Username</td><td><input type='text' name='username' maxlength='16'></td><tr/>
<td>Password[1]</td><td><input type='password' name='pw1' maxlength='32'></td><tr/>
<td>Password[2]</td><td><input type='password' name='pw2' maxlength='32'></td><tr/>
<td></td><td><input type='submit' name='submit' value='Register'></td>
</form>
</table>";
}
else
{
if(strlen($_POST['username']) < 3) $msg[] = "Username too short";
if(strlen($_POST['username']) > 16)$msg[] = "Username too long";
if(strlen($_POST['pw1']) < 6) $msg[] = "Password [1] too short";
if(strlen($_POST['pw1']) > 32)$msg[] = "Password [1] too long";
if(strlen($_POST['pw2']) < 6) $msg[] = "Password [2] too short";
if(strlen($_POST['pw']) > 32) $msg[] = "Password [2] too long";
if($_POST['pw1'] != $_POST['pw2']) $msg[] = "Passwords are not the same";
$sec = new security();
if($sec->is_secure($_POST['username']) == false) $msg[] = "Username contains forbidden symbols";
if($sec->is_secure($_POST['pw1']) == false) $msg[] = "Password [1] contains forbidden symbols";
if($sec->is_secure($_POST['pw2']) == false) $msg[] = "Password [2] contains forbidden symbols";
if(count($msg) > 0)
{
for($i = 0; $i < count($msg); $i++)
{
echo $msg[$i]."<br/>";
}
return;
}
else
{
//checking damn mssql stuff
$accountExists = mssql_num_rows(mssql_query("select StrUserID from TB_User where StrUserID='$_POST[username]'"));
if($accountExists > 0) echo "Account with such username already exists<br/>";
else
{
$pwd = md5($_POST['pw1']);
mssql_query("insert into TB_User(StrUserID,password,sec_primary,sec_seconda ry) values('$_POST[username]','$pwd','3','3')");
echo "Account successfully created<br/>";
$sql = mssql_query("SELECT * FROM TB_User WHERE StrUserId='$_POST[username]'");
$row = mssql_fetch_array($sql);
$silk = mssql_query("INSERT INTO SK_Silk(JID,silk_own,silk_gift,silk_point) VALUES ('$row[JID]','SILK VALUE HERE','0','0');
}
}
}
|
What if you want to make it with another page you've to change the bold part with your own var.
example
Quote:
<?php
//reg codes here and also the silk give
?>
<form action="your action page.php" method="POST">
<input type="text" name="user">
|
it's all about second part the name of your text box replace it with the old 1
$_POST[username] => $_POST[user]
I hope you guys got it
|
|
|
10/02/2011, 21:39
|
#27
|
elite*gold: 0
Join Date: Mar 2009
Posts: 248
Received Thanks: 118
|
Quote:
Originally Posted by PortalDark
im gonna make it this way
do it if you want:
Make a trigger that executes when an insert is done
use the UserJID as a reference and do the insert
the only thing to know right now, is if i can insert a duplicated USERJID on silk table
|
You could check first if the table already contains the JID if yes then just add more silk or do nothing. If not then insert the row.
|
|
|
10/02/2011, 21:48
|
#28
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,693
Received Thanks: 3,160
|
Quote:
Originally Posted by Vinator
You could check first if the table already contains the JID if yes then just add more silk or do nothing. If not then insert the row.
|
how could the user have already silks when account is just created ... ?
best solution to insert silks after executing account via php as my script
|
|
|
10/02/2011, 21:49
|
#29
|
elite*gold: 0
Join Date: Mar 2009
Posts: 248
Received Thanks: 118
|
Quote:
Originally Posted by LastThief
how could the user have already silks when account is just created ... ?
best solution to insert silks after executing account via php as my script
|
Read the thread first ... if it's the AddNewChar procedure there already can be silks, because the silks are account bound.
|
|
|
10/02/2011, 21:53
|
#30
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,693
Received Thanks: 3,160
|
Quote:
Originally Posted by Vinator
Read the thread first ... if it's the AddNewChar procedure there already can be silks, because the silks are account bound.
|
yes i know but using this sample of code that i gave will fix the problems of silks
|
|
|
Similar Threads
|
Vsro files. how edit mobs spawn?
01/06/2013 - SRO Private Server - 13 Replies
if. i want add mobs spawn in other place.. how make it?
|
vsro files
09/08/2011 - SRO Private Server - 11 Replies
How to get vsro server files
i dont speak turk mayby someone can translate and tell us what is this guy saying :)
if its just a fake post dont start flaming on me just tried to help !
#Request Close
|
edit clientless to work on vsro
07/20/2009 - Silkroad Online - 0 Replies
hi
so far everything that works for isro works for vsro as well but need little edit
when i asked ppl on vsro about the clientless (i need it for plvling) they said to me :get the clientless for isro and just edit version and opcode :confused: and it will work
i know it works somehow cuz i've seen many clientless plvling there
so what should i do? any1 can help me , thanks in advance
|
All times are GMT +1. The time now is 23:16.
|
|