Перейти к содержанию

Обычный Расходник


Inreal

Рекомендуемые сообщения

prontera,147,175,6	script	Магазины	864,{

set .npc$,"[Магазины]";
mes .npc$;
mes "Привет, я торгую разными товарами!!";
next;
mes .npc$;
mes "Что желаете?";
switch(select("Расходники:Стрелы:Материалы:Все для Ганслигера:Все для Ниньзи:Продать:Выйти")) {

case 1:
close2;
callshop "shop1",1;
end;

case 2:
close2;
callshop "shop2",1;
end;

case 3:
close2;
callshop "shop3",1;
end;

case 4:
close2;
callshop "shop4",1;
end;

case 5:
close2;
callshop "shop5",1;

end;

case 6:
close2;
callshop "shop5",2;

end;


case 7:
close;
OnInit:
waitingroom "Магазины",0;
end;
}
}

- shop shop1 139,568:350,12221:10000,522:8500,611:-1,501:-1,502:-1,503:-1,504:-1,1025:500,505:-1,506:-1,601:-1,602:-1,645:-1,656:-1,657:-2500,1065:-1,715:1000,716:1000,717:1000
- shop shop2 139,1750:-1,1751:-1,1752:-1,1753:-1,1754:-1,1755:-1,1756:-1,1757:-1,1758:-1,1759:-1,1760:-1,1761:-1,1762:-1,1763:-1,1764:-1,1765:-1,1766:-1,1767:-1,1768:-1,1769:-1,1770:-1,1771:-1,1772:-1
- shop shop3 139,7143:-1,7141:-1,7140:-1,985:20000,984:20000,713:3000,929:10000,1059:10000,970:20000,950:5000,1044:5000,1061:3000,1029:500,937:10000,952:10000,939:10000,7033:10000,972:25000,7134:8
- shop shop4 139,13200:-1,13201:-1,13202:-1,13203:1000,13204:1000,13205:1000,13206:1000,13207:1000,13150:-1,13102:-1,13151:-1,13153:-1,13154:-1,13155:-1,13163:-1,13165:-1,13168:-1
- shop shop5 139,2117:-1,7521:-1,7522:-1,7523:-1,7524:-1,13250:-1,13251:-1,13252:-1,13253:-1,13254:-1

Ссылка на комментарий
Поделиться на другие сайты

prontera,147,175,6	script	Магазины	864,{

set .npc$,"[Магазины]";
mes .npc$;
mes "Привет, я торгую разными товарами!!";
next;
mes .npc$;
mes "Что желаете?";
switch(select("Расходники:Стрелы:Материалы:Все для Ганслигера:Все для Ниньзи:Продать:Выйти")) {

case 1:
close2;
callshop "shop1",1;
end;

case 2:
close2;
callshop "shop2",1;
end;

case 3:
close2;
callshop "shop3",1;
end;

case 4:
close2;
callshop "shop4",1;
end;

case 5:
close2;
callshop "shop5",1;

end;

case 6:
close2;
callshop "shop5",2;

end;


case 7:
close;
OnInit:
waitingroom "Магазины",0;
end;
}
}

- shop shop1 139,568:350,12221:10000,522:8500,611:-1,501:-1,502:-1,503:-1,504:-1,1025:500,505:-1,506:-1,601:-1,602:-1,645:-1,656:-1,657:-2500,1065:-1,715:1000,716:1000,717:1000
- shop shop2 139,1750:-1,1751:-1,1752:-1,1753:-1,1754:-1,1755:-1,1756:-1,1757:-1,1758:-1,1759:-1,1760:-1,1761:-1,1762:-1,1763:-1,1764:-1,1765:-1,1766:-1,1767:-1,1768:-1,1769:-1,1770:-1,1771:-1,1772:-1
- shop shop3 139,7143:-1,7141:-1,7140:-1,985:20000,984:20000,713:3000,929:10000,1059:10000,970:20000,950:5000,1044:5000,1061:3000,1029:500,937:10000,952:10000,939:10000,7033:10000,972:25000,7134:8
- shop shop4 139,13200:-1,13201:-1,13202:-1,13203:1000,13204:1000,13205:1000,13206:1000,13207:1000,13150:-1,13102:-1,13151:-1,13153:-1,13154:-1,13155:-1,13163:-1,13165:-1,13168:-1
- shop shop5 139,2117:-1,7521:-1,7522:-1,7523:-1,7524:-1,13250:-1,13251:-1,13252:-1,13253:-1,13254:-1

Хоть бы копирайты из скрипта не убирал :mellow:

Изменено пользователем OneLife
Ссылка на комментарий
Поделиться на другие сайты

prontera,147,175,6	script	Магазины	864,{

set .npc$,"[Магазины]";
mes .npc$;
mes "Привет, я торгую разными товарами!!";
next;
mes .npc$;
mes "Что желаете?";
switch(select("Расходники:Стрелы:Материалы:Все для Ганслигера:Все для Ниньзи:Продать:Выйти")) {

case 1:
close2;
callshop "shop1",1;
end;

case 2:
close2;
callshop "shop2",1;
end;

case 3:
close2;
callshop "shop3",1;
end;

case 4:
close2;
callshop "shop4",1;
end;

case 5:
close2;
callshop "shop5",1;

end;

case 6:
close2;
callshop "shop5",2;

end;


case 7:
close;
OnInit:
waitingroom "Магазины",0;
end;
}
}

- shop shop1 139,568:350,12221:10000,522:8500,611:-1,501:-1,502:-1,503:-1,504:-1,1025:500,505:-1,506:-1,601:-1,602:-1,645:-1,656:-1,657:-2500,1065:-1,715:1000,716:1000,717:1000
- shop shop2 139,1750:-1,1751:-1,1752:-1,1753:-1,1754:-1,1755:-1,1756:-1,1757:-1,1758:-1,1759:-1,1760:-1,1761:-1,1762:-1,1763:-1,1764:-1,1765:-1,1766:-1,1767:-1,1768:-1,1769:-1,1770:-1,1771:-1,1772:-1
- shop shop3 139,7143:-1,7141:-1,7140:-1,985:20000,984:20000,713:3000,929:10000,1059:10000,970:20000,950:5000,1044:5000,1061:3000,1029:500,937:10000,952:10000,939:10000,7033:10000,972:25000,7134:8
- shop shop4 139,13200:-1,13201:-1,13202:-1,13203:1000,13204:1000,13205:1000,13206:1000,13207:1000,13150:-1,13102:-1,13151:-1,13153:-1,13154:-1,13155:-1,13163:-1,13165:-1,13168:-1
- shop shop5 139,2117:-1,7521:-1,7522:-1,7523:-1,7524:-1,13250:-1,13251:-1,13252:-1,13253:-1,13254:-1

Хоть бы копирайты из скрипта не убирал :mellow:

это г не заслуживает копирайтов

Ссылка на комментарий
Поделиться на другие сайты

  • 1 год спустя...
*callshop "<name>",<option>;

These are a series of commands used to create dynamic shops.

The callshop function calls a invisible shop (view -1) as if the player clicked on it.

For the options on callShop:

0 = The normal window (buy, sell and cancel)

1 = The buy window

2 = The sell window

Example:

callshop "DaShop",1; //Will call the shop named DaShop and opens the buy menu.

The shop which is called by callshop (as long as an npcshop* command is executed

from that NPC (see note 1)) will trigger the labels OnBuyItem and OnSellitem. These

labels can take over handling for relatively the buying of items from the shop

and selling the items to a shop. Via these labels you can customize the way an item

is bought or sold by a player.

In the OnBuyItem, two arrays are set (@bought_nameid and @bought_quantity), which

hold information about the name id (item id) sold and the amount sold of it. Same

goes for the OnSellItem label, only the variables are named different

(@sold_nameid, @sold_quantity, @sold_refine, @sold_attribute, @sold_identify,

@sold_card1, @sold_card2, @sold_card3, @sold_card4). An example on a shop comes

with rAthena, and can be found in the doc/sample/npc_dynamic_shop.txt file.

This example shows how to use the labels and their set variables to create a dynamic shop.

Note 1: These labels will only be triggered if a npcshop* command is executed, this is

because these commands set a special data on the shop NPC,named master_nd in the source.

The OnSellItem and OnBuyItem are triggered in the NPC whose master_nd is given in the shop.

This was found out thanks to 'Hondacrx', noticing the OnBuyItem wasn't triggered unless

npcshopitem was used. After rechecking the source, I found what caused this.

Изменено пользователем botka4aet
Ссылка на комментарий
Поделиться на другие сайты

×
×
  • Создать...
Яндекс.Метрика