• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Skrypt-Nicaw Acc

Status
Not open for further replies.

Kamikaz

New Member
Joined
Nov 4, 2010
Messages
112
Reaction score
0
Location
Poland
Witam.

Ostatnio kumple zaczeli robic Pokemon Ots. I robie Nicawa bo gęsiora nie chce czytać.
Czy jest możliwość napisania skryptu albo czegoś, nie wiem, że jak robisz postać, wybieramy miasto itd to dodac rubrykę z wybieraniem pokemona startera ??


Jeżeli ktoś pomoże dam Repa.


Pozdrawiam, Kamikaz
 
Tak jest taka możliwość.
Ale najpierw udostępni nam swoją wersje Nicawa, żebyśmy mieli wgląd w kod.
 
Nicawa pobrałem z witryny Nicaw.net

Najpierw pobrałem plik:
Nicaw SQL v1.5
a następnie dodatek do wersji 8.5+:
Nicaw SVN 19b

Z góry dziękuje za pomoc.
 
No ale może trochę szczegółów najpierw - nie każdy wie co chcesz osiągnąć ani gdzie to zapisać i czym jest pokemon starter?
 
Chciałbym aby przy zakładaniu postaci mozna było wybrać startera. Powinien byc taki sam pasek jak przy wyborze profesji. Chcaiłbym aby były 3 pokemony Caterpie Weedle i Rattata. Chodzi o to żeby nie trzeba było robić questów na start tlyko wybierać odrazu w Acc Makerze.
 
To ma się zapisywać gdzieś w bazie rozumiem? Storage czy co?
 
Już z 5 lat nie widziałem nicawa, ale z tego co w 5 minut obejrzałem:

W /config.inc.php:

dodaj na dole:

PHP:
$cfg['pokemons'] = array (
	1234 => 'Caterpie',
	1233 => 'Weedle',
	1232 => 'Rattata'
);

Oczywiście 1234, 1233, 1232 odpowiadają ID itemu poszczególnych pokemonów, więc zmień.

W modules/character_create.php:

pod

PHP:
$form->addSelect('sex',array(1 => 'Male', 0 => 'Female'));

dodaj

PHP:
$form->addSelect('pokemon', $cfg['pokemons']);

w tym samym pliku:

PHP:
$newplayer = Player::Create($form->attrs['name'], $_SESSION['account'], (int)$form->attrs['vocation'], (int)$form->attrs['sex'], (int)$form->attrs['residence']);

zamień na:

PHP:
$newplayer = Player::Create($form->attrs['name'], $_SESSION['account'], (int)$form->attrs['vocation'], (int)$form->attrs['sex'], (int)$form->attrs['residence'], (int)$form->attrs['pokemon']);

W pliku:

/class/player.php

zamień

PHP:
static public function Create($name, $account, $vocation, $sex, $city)

na

PHP:
static public function Create($name, $account, $vocation, $sex, $city, $pokemon)

w tym samym pliku, w funkcji Create pod:

PHP:
$SQL->myInsert('players',$d);
$pid = $SQL->insert_id();

unset($d);

dodaj

PHP:
$SQL->myInsert('player_items', array('player_id' => $pid, 'pid' => 'ZMIEN', 'sid' => 'ZMIEN', 'itemtype' => $pokemon, 'attributes' => ''));

To wyżej, tam gdzie jest ZMIEN , ustaw na odpowiadające atrybuty dla pid, sid (przykład możesz zobaczyć dla w tabeli player_items) tylko pamiętam że sid to slot id => musi być w BP, niestety czym jest pid nie pamiętam, bo struktury tabel OTS też zapomniałem, ale również możesz zobaczyć w player_items na przykładach innych itemów z bp.
 
Mam jescze 1 pytanie. Czy dałoby rade napisa Menu na środku. Jak na niektorych forach jest. Nie po bokach tylko na gorze ??
Bo kombinowałem i nie wyszło zrobiłem tylko menu 1 z lewej i 1 z prewej, ale chciałbym na gorze :D

Dziękuje za skrypty pomoc !!
Leci rep :D
 
Z tym napisem menu to nie bardzo wiem o co Ci chodzi, daj jakiś przykład :p.
 
Ale normalnie moge ich użyc na Nicawie ?? I czy gdzie je dodac chyba do skin.css co nie ??
 
Zazwyczaj jak już pobierasz gotową paczkę to jest tam plik (ewentualnie na ich stronie) "example" czyli "przykład" i postępuj według zamieszczonych tam informacji - style css, skrypty javascript itd. , jeśli już się zdecydujesz na któreś menu to nie zapomnij załadować biblioteki jquery, polecam google api (wpisz w google "google api jquery" to znajdziesz).
 
Jeszcze jak mi pokażecie jak mam edytować ten skin:
Code:
/*
    Copyright (C) 2007  Nicaw

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/


<table valign="center" align="center" style="height: 100%;"> 

* {
	  width:200px; margin-left: -100px;
  height:150px; margin-top: -75px;
  position:absolute; top:50%; left:50%;
	margin: 0;
	padding: 0;
}

body {
	
	background-image: url(kamikaz/content.png);
	position:absolute; top:0%; left:15%;
	margin: 0;
	background-color: black;
	background-repeat: repeat-x;
}
img {
	margin: auto;
	border: 0;
}
a {
	margin: auto;
	color: black;
}
h2 {

	margin: auto;
	background-repeat: no-repeat;
	font: normal normal 1.5em "Comic Sans MS",serif;
    text-decoration: none;
	height: 40px;
	padding-left: 25px;
}
legend {

	color: black;
	font: normal normal 1em "Comic Sans MS",serif;
}
form,input {
	margin-left: auto;
	margin-right: auto;
	margin: 0; 
	padding: 0; 
	display: inline;
}
fieldset{
	margin-left: auto;
	margin-right: auto;
	padding: 5px;
}
ul {
	margin-left: auto;
	margin-right: auto;
	list-style: none;
	margin: 0;
	padding: 0;
}
a:hover{
	margin-left: auto;
	margin-right: auto;
	font-weight: normal;
	color: gray;
}
.color0 {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
	background-color: #a0a0a0;
	color: white;
	
}
.color1 {
	margin-left: auto;
	margin-right: auto;
	margin-left: auto;
	margin-right: auto;
	background-color: #e2e2e2;
}
.color2 {
	margin-left: auto;
	margin-right: auto;
	margin-left: auto;
	margin-right: auto;
	background-color: #f5f5f5;
}
.top {
	margin-left: auto;
	margin-right: auto;
	color: white;
		font: normal normal 1em "Comic Sans MS",serif;

}
.online {
	margin-left: auto;
	margin-right: auto;
	color: #51850d;
	font-weight: bold;
}
.offline {
	margin-left: auto;
	margin-right: auto;
	font-weight: bold;
}
.rowselect {
	margin-left: auto;
	margin-right: auto;
	cursor: pointer;
}
.rowselect:hover {
	margin-left: auto;
	margin-right: auto;
	background-color: #fcecbf;
}
.task-menu{
	margin-left: auto;
	margin-right: auto;
	cursor: pointer;
}
.task-menu li{
	list-style-type: none;
	height: 16px;
	background-repeat: no-repeat;
	padding-left: 20px;
	padding-bottom: 5px;
	
}
.task-menu li:hover {
	background-color: #a0a0a0;
}
#container {
	width: 800px;
	position: relative;
}
#header {	
	margin: auto;
	background-image: url(kamikaz/header.png);
	background-repeat: no-repeat;
	position: absolute;
	width: 800px;
	height: 190px;
}
#server_name {
	display: none;
}
#panel {
	position: absolute;
	margin-top: 180px;
}	
#panel a:hover {
	font-weight: bold;
	color: white;
}
#panel li {
	margin: auto;
	background-image: url(kamikaz/chains.png);
	background-repeat: no-repeat;
	padding-left: 30px;
	list-style-type: none;
	height: 23px;
}
#panel .top {
	margin: auto;
	background-image: url(kamikaz/nav-top.gif);
	width: 174px;
	height: 40px;
	padding-left: 0;
	padding-right: 0;
	padding-top: 5px;
	text-align: center;
	font-weight: bold;
}
#panel .mid {
	margin: auto;
	background-image: url(kamikaz/chains.png);
	background-repeat: repeat-y;
	text-align: center;
	padding: 10px;
	width: 154px;
}
#panel .bot {
	margin: auto;
	background-image: url(kamikaz/menu_bot.png);
	background-repeat: no-repeat;
	padding: 0;
	margin: 0;
	width: 174px;
	height: 22px;
}
#panel ul {
	width: 174px;
	padding: 0;
	margin: 0;
}
#panel a {
	text-decoration: none;
	color: white;
	font: normal normal 1em "Comic Sans MS",serif;
}
#panel a:hover {
	font-weight: bold;
}

#panel2 {
	position: absolute;
	margin-top: 175px;
	margin-left: 800px;
}		
#panel2 li {
	background-image: url(kamikaz/chains.png);
	background-repeat: no-repeat;
	border-top: 0px;
	padding-left: 40px;
	list-style-type: none;
	height: 20px;
}
#panel2 .top {
	background-image: url(kamikaz/nav-top.gif);
	width: 174px;
	height: 40px;
	padding-left: 0;
	padding-right: 0;
	padding-top: 5px;
	text-align: center;
	font-weight: bold;
}
#panel2 .mid {
	background-image: url(kamikaz/chains.gif);
	background-repeat: repeat-y;
	text-align: center;
	padding: 10px;
	width: 154px;
}
#panel2 .bot {
	height: 22px;
	clear: both;
	background: url('kamikaz/menu_bot.png') repeat-x;
	color: #d1e3ee;
}
#panel2 ul {
	width: 174px;
	padding: 0;
	margin: 0;
}
#panel2 a {
	text-decoration: none;
	color: #1e3f51;
}
#panel2 a:hover {
	font-weight: bold;
}





.pri-nav a{
	display:block;
	text-decoration:none;
	text-indent:-30000px;
}

.content{
	margin-top:160px;
}

#content-title{
	background: url(../img/content-title.png) no-repeat scroll;
	height:323px;
	position:absolute;
	width:100%;
}

#content {
	position: absolute;
	margin-left: 174px;
	margin-top: 180px;
}
#content .top {
	margin: auto;
	background-image: url(kamikaz/newsheadline_background.gif);
	width: 626px;
	height: 25px;
	padding-left: 0;
	padding-right: 0;
	padding-top: 5px;
	text-align: center;
	font-weight: bold;
}
#content .mid {
	margin: auto;
	background-image: url(kamikaz/big-mid.png);
	background-repeat: repeat-y;
	padding-left: 20px;
	padding-right: 20px;
	padding-top: 10px;
	padding-bottom: 10px;
	width: 586px;
	min-height: 200px;
}
#content .bot {
	background-image: url(kamikaz/cnt-bot.png);
	background-repeat: no-repeat;
	padding: 0;
	margin: 0;
	width: 626px;
	height: 43px;
}



#error {
	background-image: url(kamikaz/error.png);
	background-repeat: no-repeat;
	position: absolute;
	font-family: Comic Sans MS;
	font-size: 8pt;
	font-weight: bold;
	width: 175px;
	height: 70px;
	padding-left: 60px;
	padding-right: 15px;
	padding-top: 20px;
	padding-bottom: 20px;
	margin-left: 240px;
	margin-top: 100px;
	cursor: pointer;
}
#captcha-image {
	margin-top: 5px;
}
#account-image {
	background-image: url(kamikaz/introduction.gif);
	background-repeat: no-repeat;
	width: 300px;
	height: 200px;
	float: right;
}
#choose-skill {
	float: left;
	margin-right: 20px;
}
#form #iobox {
	z-index: 10;
	position: fixed;
	/*IE position: absolute;*/
	background-color: #e2e2e2;
	border: 2px outset #000;
	cursor: move;
}
#form #iobox fieldset {
	cursor: default;
	
	
}

To będe Very Happy :D

Chciałem użyc tego Menu i później go edytować pod moje wymagania:
Code:
http://net.tutsplus.com/tutorials/javascript-ajax/create-a-cool-animated-navigation-with-css-and-jquery/

Bo jak ja próbuje edytować to wogóle go nie wyświetla :/

Pozdrawiam, Kamikaz
 
Last edited:
Ale po co Ci edytować styl nicawa?

CTRL + U na slick animated menu

I widzisz w <head></head>:


<link rel="stylesheet" href="css/main.css" type="text/css" />
<script type="text/javascript" src="js/jquery.js" ></script>
<script type="text/javascript" src="js/jquery-bp.js" ></script>
<script type="text/javascript" src="js/navigation.js" ></script>

Wszystko czego potrzebujesz do poprawnego zainstalowania menu... I to wszystko jest w paczce z tym menu. To są podstawy, więc nie powinieneś mieć z tym problemów na tym etapie, następnym razem poszukaj sobie rozwiązania na google.
 
ja się tak zastanawiam po co pomagacie idiocie?
ostatnio pomagaliście z projektmai, naruto, ninja, dragon ball, potem znowu dragon ball, teraz pokemon, jak ten upadnie to może zrobi tibijski burdel, napiszecie mu skrypt na dziwki, w zamian za tibijskie ruchanie za darmo?

a najgorsze jest to, że on nawet nie próbuje sam nic zrobić, tylko leci na forum z każdą głupotą, widzieliście gdzieś jego kod, który sam próbował zrobić i mu nie wyszło? żenada...
 
ja się tak zastanawiam po co pomagacie idiocie?
ostatnio pomagaliście z projektmai, naruto, ninja, dragon ball, potem znowu dragon ball, teraz pokemon, jak ten upadnie to może zrobi tibijski burdel, napiszecie mu skrypt na dziwki, w zamian za tibijskie ruchanie za darmo?

a najgorsze jest to, że on nawet nie próbuje sam nic zrobić, tylko leci na forum z każdą głupotą, widzieliście gdzieś jego kod, który sam próbował zrobić i mu nie wyszło? żenada...

Nie przesadzaj, są jakieś granice - nicaw > gesior więc mógł mieć problemy ... A jeśli chodzi o instalacje menu to przesadził z tą instalacją fakt... ale niech robi, niech się uczy na błędach bo przecież lepiej uczyć się na błędach i zrobić coś własnego niż postawić gotowca jak to 90% społeczności ma w naturze - zajebią kopię tibia.com (czytaj real map + szablonik) i sypną punkty gildiom, czy jak to tam teraz modne się robi, zapłacą gildiom w ojro za grę i cieszą ryj, jakby byli kimś więcej niż nikim.
 
Status
Not open for further replies.
Back
Top